* Finish task#8781.
This commit is contained in:
@@ -198,6 +198,7 @@ class issueModel extends model
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->limit($limit)
|
||||
->query();
|
||||
|
||||
$issues = array();
|
||||
|
||||
@@ -260,7 +260,7 @@ class riskModel extends model
|
||||
*
|
||||
* @param string $account
|
||||
* @param int $limit
|
||||
* @param string $status active|closed|hangup|canceled
|
||||
* @param string $status all|active|closed|hangup|canceled
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -272,6 +272,7 @@ class riskModel extends model
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->limit($limit)
|
||||
->query();
|
||||
|
||||
$risks = array();
|
||||
|
||||
@@ -1079,6 +1079,36 @@ class testtaskModel extends model
|
||||
return $runs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get testtask pairs of a user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param int $limit
|
||||
* @param string $status all|wait|doing|done|blocked
|
||||
* @param string $skipProjectIDList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserTesttaskPairs($account, $limit = 10, $status = 'all', $skipProjectIDList = '')
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as project')
|
||||
->from(TABLE_TESTTASK)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.PRJ = t2.id')
|
||||
->where('t1.owner')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->beginIF(!empty($skipProjectIDList))->andWhere('t1.project')->notin($skipProjectIDList)->fi()
|
||||
->limit($limit)
|
||||
->query();
|
||||
|
||||
$testtaskPairs = array();
|
||||
while($testtask = $stmt->fetch())
|
||||
{
|
||||
$testtaskPairs[$testtask->id] = $testtask->project . ' / ' . $testtask->name;
|
||||
}
|
||||
return $testtaskPairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info of a test run.
|
||||
*
|
||||
|
||||
@@ -352,9 +352,13 @@ class todoModel extends model
|
||||
if(!$todo) return false;
|
||||
$todo = $this->loadModel('file')->replaceImgURL($todo, 'desc');
|
||||
if($setImgSize) $todo->desc = $this->file->setImgSize($todo->desc);
|
||||
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
|
||||
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
|
||||
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
|
||||
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
|
||||
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
|
||||
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
|
||||
if($todo->type == 'issue') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_ISSUE)->fetch('title');
|
||||
if($todo->type == 'risk') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name');
|
||||
if($todo->type == 'review') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title');
|
||||
if($todo->type == 'testtask') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TESTTASK)->fetch('name');
|
||||
$todo->date = str_replace('-', '', $todo->date);
|
||||
return $todo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user