This commit is contained in:
sunguangming
2024-05-16 09:53:07 +08:00
parent 1ac040a9cc
commit fd7dcbf849
3 changed files with 12 additions and 1 deletions
+10
View File
@@ -2320,6 +2320,15 @@ class executionModel extends model
}
/* Build search form. */
$gradePairs = array();
$gradeList = $this->loadModel('story')->getGradeList('');
foreach($gradeList as $grade)
{
$key = (string)$grade->type . (string)$grade->grade;
$gradePairs[$key] = $grade->name;
}
asort($gradePairs);
if($type == 'executionStory') $this->config->product->search['module'] = 'executionStory';
$this->config->product->search['actionURL'] = $actionURL;
$this->config->product->search['queryID'] = $queryID;
@@ -2328,6 +2337,7 @@ class executionModel extends model
$this->config->product->search['params']['product']['values'] = $productPairs + array('all' => $this->lang->product->allProductsOfProject);
$this->config->product->search['params']['plan']['values'] = $planPairs;
$this->config->product->search['params']['module']['values'] = $modules;
$this->config->product->search['params']['grade']['values'] = $gradePairs;
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
$this->config->product->search['params']['stage']['values'] = array('' => '') + $this->lang->story->stageList;
if($productType == 'normal')
+1 -1
View File
@@ -720,7 +720,7 @@ class productModel extends model
$gradePairs = $this->loadModel('story')->getGradePairs($storyType, 'all');
if($storyType == 'all')
if($projectID)
{
$gradePairs = array();
$gradeList = $this->loadModel('story')->getGradeList('');
+1
View File
@@ -454,6 +454,7 @@ class storyTao extends storyModel
$storyQuery = $this->replaceAllProductQuery($this->session->executionStoryQuery);
$storyQuery = $this->replaceRevertQuery($storyQuery, $productID);
$storyQuery = preg_replace('/`(\w+)`/', 't2.`$1`', $storyQuery);
$storyQuery = preg_replace_callback("/t2.`grade` (=|!=) '(\w+)(\d+)'/", function($matches){return "t2.`grade` {$matches[1]} '" . $matches[3] . "' AND t2.`type` = '" . $matches[2] . "'";}, $storyQuery);
if(strpos($storyQuery, 'result') !== false) $storyQuery = str_replace('t2.`result`', 't4.`result`', $storyQuery);
return $this->dao->select("distinct t1.*, t2.*, IF(t2.`pri` = 0, {$this->config->maxPriValue}, t2.`pri`) as priOrder, t3.type as productType, t2.version as version")->from(TABLE_PROJECTSTORY)->alias('t1')