* use finishedBy instead of assignedTo.

This commit is contained in:
wangchunsheng
2011-10-29 09:52:27 +00:00
parent 0904f9ce6f
commit 0ad444db87
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -544,7 +544,7 @@ class bug extends control
$this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->confirmBug;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->position[] = $this->lang->bug->confirm;
$this->view->position[] = $this->lang->bug->confirmBug;
$this->view->bug = $bug;
$this->view->actions = $this->action->getList('bug', $bugID);
+4 -4
View File
@@ -425,18 +425,18 @@ class taskModel extends model
* @access public
* @return array
*/
public function getProjectTaskPairs($projectID, $status = 'all', $orderBy = 'id_desc')
public function getProjectTaskPairs($projectID, $status = 'all', $orderBy = 'finishedBy, id_desc')
{
$tasks = array('' => '');
$stmt = $this->dao->select('t1.id, t1.name, t2.realname AS assignedToRealName')
$stmt = $this->dao->select('t1.id, t1.name, t2.realname AS finishedByRealName')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.assignedTo = t2.account')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.finishedBy = t2.account')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
->orderBy($orderBy)
->query();
while($task = $stmt->fetch()) $tasks[$task->id] = "$task->id:$task->assignedToRealName:$task->name";
while($task = $stmt->fetch()) $tasks[$task->id] = "$task->id:$task->finishedByRealName:$task->name";
return $tasks;
}