* adjust for get testtask list.

This commit is contained in:
王怡栋
2022-03-01 13:58:00 +08:00
parent e83555ffd3
commit 38ed825461
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -109,6 +109,8 @@ class testtask extends control
$sort = common::appendOrder($orderBy);
/* Get tasks. */
$product = $this->product->getById($productID);
if($product->type == 'normal') $branch = 'all';
$tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->common;
+2 -1
View File
@@ -68,9 +68,10 @@ class testtaskModel extends model
* @access public
* @return array
*/
public function getProductTasks($productID, $branch = 0, $orderBy = 'id_desc', $pager = null, $scopeAndStatus = array(), $beginTime = 0, $endTime = 0)
public function getProductTasks($productID, $branch = 'all', $orderBy = 'id_desc', $pager = null, $scopeAndStatus = array(), $beginTime = 0, $endTime = 0)
{
$products = $scopeAndStatus[0] == 'all' ? $this->app->user->view->products : array();
$branch = $scopeAndStatus[0] == 'all' ? 'all' : $branch;
return $this->dao->select("t1.*, t2.name AS productName, t3.name AS executionName, t4.name AS buildName, t4.branch AS branch")
->from(TABLE_TESTTASK)->alias('t1')