diff --git a/module/api/v1/entries/testtasks.php b/module/api/v1/entries/testtasks.php index 86f5060351..6ee339ca5a 100644 --- a/module/api/v1/entries/testtasks.php +++ b/module/api/v1/entries/testtasks.php @@ -86,7 +86,7 @@ class testtasksEntry extends entry if(empty($buildID)) return $this->sendError(400, 'need build id!'); /* Check whether executionID and buildID is valid. */ - $executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID); + $executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, '', $projectID); $builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk'); if(!isset($executions[$executionID])) return $this->sendError(400, 'error execution id!'); if(!isset($builds[$buildID])) return $this->sendError(400, 'error build id!'); diff --git a/module/bug/control.php b/module/bug/control.php index b29f49c131..94e7508364 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -172,7 +172,7 @@ class bug extends control $this->view->product = $product; $this->view->project = $this->loadModel('project')->getByID($bug->project); $this->view->projects = $projects; - $this->view->executions = $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, (string)$projectID, 'noclosed'); + $this->view->executions = $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, (int)$projectID, 'noclosed'); $this->view->bug = $bug; $this->view->bugModule = empty($bug->module) ? '' : $this->tree->getByID($bug->module); $this->view->modulePath = $this->loadModel('tree')->getParents($bug->module); @@ -451,7 +451,7 @@ class bug extends control $this->view->bug = $oldBug; $this->view->execution = $oldBug->execution ? $this->loadModel('execution')->getByID($oldBug->execution) : ''; $this->view->users = $this->loadModel('user')->getPairs('noclosed'); - $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($oldBug->product, $oldBug->branch ? "0,{$oldBug->branch}" : 0, (string)$oldBug->project, 'stagefilter'); + $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($oldBug->product, $oldBug->branch ? "0,{$oldBug->branch}" : 0, (int)$oldBug->project, 'stagefilter'); $this->view->builds = $this->loadModel('build')->getBuildPairs($oldBug->product, $oldBug->branch, 'withbranch,noreleased'); $this->view->actions = $this->loadModel('action')->getList('bug', $bugID); $this->display(); diff --git a/module/bug/model.php b/module/bug/model.php index 58db3963df..d653e63c42 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -738,7 +738,7 @@ class bugModel extends model $this->config->bug->search['params']['product']['values'] = $productParams; $this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID); $this->config->bug->search['params']['module']['values'] = $modules; - $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, '0', (string)$projectID); + $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, '0', (int)$projectID); $this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939. $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productID, 'all', 'withbranch|releasetag'); $this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values']; diff --git a/module/bug/zen.php b/module/bug/zen.php index 85c69bd745..7135773c2a 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -421,7 +421,7 @@ class bugZen extends bug $execution = null; $execution = ''; - $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : '0', (string)$projectID, !$projectID ? 'multiple|stagefilter' : 'stagefilter'); + $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : '0', (int)$projectID, !$projectID ? 'multiple|stagefilter' : 'stagefilter'); if($executionID) { $execution = $this->loadModel('execution')->getByID($executionID); @@ -1167,7 +1167,7 @@ class bugZen extends bug /* 获取执行列表。*/ /* Get execution pairs. */ - $executions = array('') + $this->product->getExecutionPairsByProduct($bug->product, (string)$bug->branch, (string)$bug->project); + $executions = array('') + $this->product->getExecutionPairsByProduct($bug->product, (string)$bug->branch, (int)$bug->project); if(!empty($bug->execution) && empty($executions[$bug->execution])) $executions[$execution->id] = $execution->name . "({$this->lang->bug->deleted})"; /* 获取项目列表。*/ @@ -1345,7 +1345,7 @@ class bugZen extends bug $this->view->projects = $this->product->getProjectPairsByProduct($product->id, $branch ? "0,{$branch}" : '0'); $this->view->project = $project; $this->view->projectID = $projectID; - $this->view->executions = $this->product->getExecutionPairsByProduct($product->id, $branch ? "0,{$branch}" : '0', (string)$projectID, 'multiple,stagefilter'); + $this->view->executions = $this->product->getExecutionPairsByProduct($product->id, $branch ? "0,{$branch}" : '0', (int)$projectID, 'multiple,stagefilter'); $this->view->executionID = $executionID; $this->view->stories = $stories; $this->view->builds = $builds; diff --git a/module/build/control.php b/module/build/control.php index b5a79037cc..9919f86198 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -195,7 +195,7 @@ class build extends control $builds = $this->build->getBuildPairs($build->product, 'all', 'noempty,notrunk,singled,separate', $build->project, 'project', $build->builds, false); } - $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project, 'stagefilter'); + $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, (int)$this->session->project, 'stagefilter'); $executionType = $build->execution ? $this->execution->getByID($build->execution) : ''; if($build->execution and !isset($executions[$build->execution])) $executions[$build->execution] = $this->loadModel('execution')->getById($build->execution)->name; @@ -863,7 +863,7 @@ class build extends control $this->config->bug->search['style'] = 'simple'; $this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($build->product, $build->branch, '', true); $this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($build->product, 'bug', 0, $build->branch); - $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project); + $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($build->product, $build->branch, (int)$this->session->project); $this->config->bug->search['params']['openedBuild']['values'] = $this->build->getBuildPairs($build->product, $branch = 'all', $params = 'releasetag'); $this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values']; diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index 2a1784429f..2b35b5fd39 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -591,7 +591,7 @@ class projectrelease extends control $this->config->bug->search['queryID'] = $queryID; $this->config->bug->search['style'] = 'simple'; $this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($release->product, $release->branch, 'withMainPlan', true); - $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, $release->branch, 'id_desc', $release->project); + $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, $release->branch, $release->project); $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($release->product, $branch = 0); $this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values']; diff --git a/module/testtask/control.php b/module/testtask/control.php index 715e4ca26f..f87ad242c2 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -250,7 +250,7 @@ class testtask extends control $this->view->product = $this->product->getByID($productID); $this->view->projectID = $projectID; $this->view->executionID = $executionID; - $this->view->executions = $productID ? $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID, 'stagefilter') : array(); + $this->view->executions = $productID ? $this->loadModel('product')->getExecutionPairsByProduct($productID, '', $projectID, 'stagefilter') : array(); $this->view->builds = $productID ? $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk,withexecution', $projectID, 'project', '', false) : array(); $this->view->build = $build; $this->view->testreports = array('') + $this->loadModel('testreport')->getPairs($productID); @@ -1057,7 +1057,7 @@ class testtask extends control $this->app->rawModule = 'testcase'; $projectID = $this->app->tab == 'qa' ? 0 : $this->session->project; - $executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID); + $executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', $projectID); $builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk', 0, 'execution', '', false); $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->importUnitResult; diff --git a/module/testtask/zen.php b/module/testtask/zen.php index 8e68538df0..da9ab2396d 100644 --- a/module/testtask/zen.php +++ b/module/testtask/zen.php @@ -284,7 +284,7 @@ class testtaskZen extends testtask $productID = $productID ? $productID : key($this->products); $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project; $executionID = $task->execution; - $executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID); + $executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, $projectID); if($executionID && !isset($executions[$executionID])) { $execution = $this->loadModel('execution')->getById($executionID);