* adjust code for testtask.
This commit is contained in:
@@ -5,4 +5,4 @@ $config->report->dailyreminder = new stdclass();
|
||||
$config->report->dailyreminder->bug = true;
|
||||
$config->report->dailyreminder->task = true;
|
||||
$config->report->dailyreminder->todo = true;
|
||||
$config->report->dailyreminder->testtask = true;
|
||||
$config->report->dailyreminder->testTask = true;
|
||||
|
||||
@@ -161,17 +161,17 @@ class report extends control
|
||||
if($this->config->report->dailyreminder->bug) $bugs = $this->report->getUserBugs();
|
||||
if($this->config->report->dailyreminder->task) $tasks = $this->report->getUserTasks();
|
||||
if($this->config->report->dailyreminder->todo) $todos = $this->report->getUserTodos();
|
||||
if($this->config->report->dailyreminder->testtask) $testtasks = $this->report->getUserTesttasks();
|
||||
if($this->config->report->dailyreminder->testTask) $testTasks = $this->report->getUserTestTasks();
|
||||
|
||||
$reminder = array();
|
||||
|
||||
$users = array_unique(array_merge(array_keys($bugs), array_keys($tasks), array_keys($todos), array_keys($testtasks)));
|
||||
$users = array_unique(array_merge(array_keys($bugs), array_keys($tasks), array_keys($todos), array_keys($testTasks)));
|
||||
if(!empty($users)) foreach($users as $user) $reminder[$user] = new stdclass();
|
||||
|
||||
if(!empty($bugs)) foreach($bugs as $user => $bug) $reminder[$user]->bugs = $bug;
|
||||
if(!empty($tasks)) foreach($tasks as $user => $task) $reminder[$user]->tasks = $task;
|
||||
if(!empty($todos)) foreach($todos as $user => $todo) $reminder[$user]->todos = $todo;
|
||||
if(!empty($testtasks)) foreach($testtasks as $user => $testtask) $reminder[$user]->testtasks = $testtask;
|
||||
if(!empty($testTasks)) foreach($testTasks as $user => $testTask) $reminder[$user]->testTasks = $testTask;
|
||||
|
||||
$this->loadModel('mail');
|
||||
|
||||
@@ -194,7 +194,7 @@ class report extends control
|
||||
$mailTitle .= isset($mail->bugs) ? sprintf($this->lang->report->mailtitle->bug, count($mail->bugs)) : '';
|
||||
$mailTitle .= isset($mail->tasks) ? sprintf($this->lang->report->mailtitle->task, count($mail->tasks)) : '';
|
||||
$mailTitle .= isset($mail->todos) ? sprintf($this->lang->report->mailtitle->todo, count($mail->todos)) : '';
|
||||
$mailTitle .= isset($mail->testtasks) ? sprintf($this->lang->report->mailtitle->testtask, count($mail->testtasks)) : '';
|
||||
$mailTitle .= isset($mail->testTasks) ? sprintf($this->lang->report->mailtitle->testTask, count($mail->testTasks)) : '';
|
||||
$mailTitle = rtrim($mailTitle, ',');
|
||||
|
||||
/* Send email.*/
|
||||
|
||||
@@ -87,13 +87,13 @@ $lang->report->idAB = 'ID';
|
||||
$lang->report->bugTitle = 'Bug Title';
|
||||
$lang->report->taskName = 'Task Name';
|
||||
$lang->report->todoName = 'Todo Name';
|
||||
$lang->report->testtaskName = 'Testtask Name';
|
||||
$lang->report->testTaskName = 'Testtask Name';
|
||||
|
||||
$lang->report->mailtitle = new stdclass();
|
||||
$lang->report->mailtitle->begin = 'Notice : Your';
|
||||
$lang->report->mailtitle->bug = " Bugs(%s),";
|
||||
$lang->report->mailtitle->task = " Tasks(%s),";
|
||||
$lang->report->mailtitle->todo = " Todos(%s),";
|
||||
$lang->report->mailtitle->testtask = " Testtask(%s),";
|
||||
$lang->report->mailtitle->testTask = " Testtask(%s),";
|
||||
|
||||
$lang->report->proVersion = '<a href="http://api.zentao.net/goto.php?item=proversion&from=reportpage" target="_blank">Try pro version for more!</a>';
|
||||
|
||||
@@ -87,13 +87,13 @@ $lang->report->idAB = 'ID';
|
||||
$lang->report->bugTitle = 'Bug标题';
|
||||
$lang->report->taskName = '任务名称';
|
||||
$lang->report->todoName = '待办名称';
|
||||
$lang->report->testtaskName = '版本名称';
|
||||
$lang->report->testTaskName = '版本名称';
|
||||
|
||||
$lang->report->mailtitle = new stdclass();
|
||||
$lang->report->mailtitle->begin = '提醒:您有';
|
||||
$lang->report->mailtitle->bug = " Bugs(%s),";
|
||||
$lang->report->mailtitle->task = " 任务(%s),";
|
||||
$lang->report->mailtitle->todo = " 待办(%s),";
|
||||
$lang->report->mailtitle->testtask = " 测试版本(%s),";
|
||||
$lang->report->mailtitle->testTask = " 测试版本(%s),";
|
||||
|
||||
$lang->report->proVersion = '<a href="http://api.zentao.net/goto.php?item=proversion&from=reportpage" target="_blank">更多精彩,尽在专业版!</a>';
|
||||
|
||||
@@ -87,13 +87,13 @@ $lang->report->idAB = 'ID';
|
||||
$lang->report->bugTitle = 'Bug標題';
|
||||
$lang->report->taskName = '任務名稱';
|
||||
$lang->report->todoName = '待辦名稱';
|
||||
$lang->report->testtaskName = '版本名稱';
|
||||
$lang->report->testTaskName = '版本名稱';
|
||||
|
||||
$lang->report->mailtitle = new stdclass();
|
||||
$lang->report->mailtitle->begin = '提醒:您有';
|
||||
$lang->report->mailtitle->bug = " Bugs(%s),";
|
||||
$lang->report->mailtitle->task = " 任務(%s),";
|
||||
$lang->report->mailtitle->todo = " 待辦(%s),";
|
||||
$lang->report->mailtitle->testtask = " 測試版本(%s),";
|
||||
$lang->report->mailtitle->testTask = " 測試版本(%s),";
|
||||
|
||||
$lang->report->proVersion = '<a href="http://api.zentao.net/goto.php?item=proversion&from=reportpage" target="_blank">更多精彩,盡在專業版!</a>';
|
||||
|
||||
@@ -377,23 +377,19 @@ class reportModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user testtasks.
|
||||
* Get user testTasks.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserTesttasks()
|
||||
public function getUserTestTasks()
|
||||
{
|
||||
$stmt = $this->dao->select('t1.*, t2.account as user')->from(TABLE_TESTTASK)->alias('t1')
|
||||
return $this->dao->select('t1.*, t2.account as user')->from(TABLE_TESTTASK)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.owner = t2.account')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->andWhere("(t1.status='wait' OR t1.status='doing')")
|
||||
->query();
|
||||
|
||||
$testtasks = array();
|
||||
while($testtask = $stmt->fetch()) $testtasks[$testtask->user][] = $testtask;
|
||||
return $testtasks;
|
||||
->fetchGroup('user');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,20 +63,20 @@
|
||||
</table>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(isset($mail->testtasks)):?>
|
||||
<?php if(isset($mail->testTasks)):?>
|
||||
<table width='66%' align='center'>
|
||||
<tr class='header'>
|
||||
<th class='w-id'><?php echo $lang->report->idAB;?></th>
|
||||
<th><?php echo $lang->report->testtaskName;?></th>
|
||||
<th><?php echo $lang->report->testTaskName;?></th>
|
||||
</tr>
|
||||
<?php foreach($mail->testtasks as $testtask):?>
|
||||
<?php foreach($mail->testTasks as $testTask):?>
|
||||
<tr>
|
||||
<td><?php echo $testtask->id;?></td>
|
||||
<td><?php echo $testTask->id;?></td>
|
||||
<td>
|
||||
<?php
|
||||
$link = $this->createLink('testtask', 'view', "testtask=$testtask->id");
|
||||
$link = $this->createLink('testTask', 'view', "testTask=$testTask->id");
|
||||
if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link);
|
||||
echo html::a($url . $link, $testtask->name);
|
||||
echo html::a($url . $link, $testTask->name);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user