diff --git a/module/build/control.php b/module/build/control.php index 00adc6156e..9493ff919b 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -674,7 +674,7 @@ class build extends control } else { - $allStories = $this->story->getExecutionStories($executionID, $build->product, 0, 't1.`order`_desc', 'byBranch', $build->branch, 'story', $build->allStories, $pager); + $allStories = $this->story->getExecutionStories($executionID, $build->product, 't1.`order`_desc', 'byBranch', $build->branch, 'story', $build->allStories, $pager); } $this->view->allStories = $allStories; diff --git a/module/execution/control.php b/module/execution/control.php index 65abb832d0..e494259a9d 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -825,7 +825,7 @@ class execution extends control if($this->app->getViewType() == 'xhtml') $recPerPage = 10; $pager = new pager($recTotal, $recPerPage, $pageID); - $stories = $this->story->getExecutionStories($executionID, 0, 0, $sort, $type, $param, $storyType, '', $pager); + $stories = $this->story->getExecutionStories($executionID, 0, $sort, $type, $param, $storyType, '', $pager); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false); @@ -2973,7 +2973,7 @@ class execution extends control if($_POST) { - $stories = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, $orderBy); + $stories = $this->loadModel('story')->getExecutionStories($executionID, 0, $orderBy); $storySpecs = $this->story->getStorySpecs(array_keys($stories)); $order = 1; diff --git a/module/execution/test/execution.class.php b/module/execution/test/execution.class.php index a773c81725..bc2a3646d0 100644 --- a/module/execution/test/execution.class.php +++ b/module/execution/test/execution.class.php @@ -2565,7 +2565,7 @@ class executionTest { global $tester; $contents = array('story', 'wait', 'doing', 'done', 'cancel'); - $stories = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 'id_asc'); + $stories = $tester->loadModel('story')->getExecutionStories($executionID, 0, 'id_asc'); $kanbanTasks = $this->executionModel->getKanbanTasks($executionID, "id"); $kanbanBugs = $tester->loadModel('bug')->getExecutionBugs($executionID); $users = array(); diff --git a/module/kanban/model.php b/module/kanban/model.php index c1ff8571aa..590ee8d742 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1394,7 +1394,7 @@ class kanbanModel extends model ->fetchgroup('lane', 'column'); /* Get group objects. */ - if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory'); + if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory'); if($browseType == 'all' or $browseType == 'bug') $objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'all' or $browseType == 'task') $objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id"); @@ -1483,7 +1483,7 @@ class kanbanModel extends model ->fetchGroup('lane', 'id'); /* Get group objects. */ - if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory'); + if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory'); if($browseType == 'all' or $browseType == 'bug') $objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'all' or $browseType == 'task') $objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id"); @@ -1594,7 +1594,7 @@ class kanbanModel extends model { /* Get card data. */ $cardList = array(); - if($browseType == 'story') $cardList = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory'); + if($browseType == 'story') $cardList = $this->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory'); if($browseType == 'bug') $cardList = $this->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'task') $cardList = $this->loadModel('execution')->getKanbanTasks($executionID); @@ -2922,7 +2922,7 @@ class kanbanModel extends model if($laneType == 'story') { - $stories = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory', 0, 'story', $otherCardList); + $stories = $this->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory', 0, 'story', $otherCardList); foreach($stories as $storyID => $story) { foreach($this->config->kanban->storyColumnStageList as $colType => $stage) diff --git a/module/kanban/test/kanban.class.php b/module/kanban/test/kanban.class.php index a3bb5b49b7..d6080bb41f 100644 --- a/module/kanban/test/kanban.class.php +++ b/module/kanban/test/kanban.class.php @@ -661,7 +661,7 @@ class kanbanTest { global $tester; /* Get group objects. */ - if($browseType == 'story') $cardList = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory'); + if($browseType == 'story') $cardList = $tester->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory'); if($browseType == 'bug') $cardList = $tester->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'task') $cardList = $tester->loadModel('execution')->getKanbanTasks($executionID, "id"); $objects = $this->objectModel->getLanes4Group($executionID, $browseType, $groupBy, $cardList); @@ -1718,7 +1718,7 @@ class kanbanTest { global $tester; /* Get group objects. */ - if($objecType == 'story') $objectGroup['story'] = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory'); + if($objecType == 'story') $objectGroup['story'] = $tester->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory'); if($objecType == 'bug') $objectGroup['bug'] = $tester->loadModel('bug')->getExecutionBugs($executionID); if($objecType == 'task') $objectGroup['task'] = $tester->loadModel('execution')->getKanbanTasks($executionID, "id"); diff --git a/module/product/zen.php b/module/product/zen.php index 896c91b3f8..b4babd3e03 100644 --- a/module/product/zen.php +++ b/module/product/zen.php @@ -1257,7 +1257,7 @@ class productZen extends product $this->products = $this->product->getProducts($projectID, 'all', '', false); if($browseType == 'bybranch') $param = $branchID; - $stories = $this->story->getExecutionStories($projectID, $productID, $branchID, $sort, $browseType, $param, $storyType, '', $pager); + $stories = $this->story->getExecutionStories($projectID, $productID, $sort, $browseType, $param, $storyType, '', $pager); } else { diff --git a/module/story/model.php b/module/story/model.php index 5557bfc572..6fd8b05fdb 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -212,7 +212,6 @@ class storyModel extends model * * @param int $executionID * @param int $productID - * @param string|int $branch * @param string $orderBy * @param string $type * @param int|string $param @@ -222,7 +221,7 @@ class storyModel extends model * @access public * @return array */ - public function getExecutionStories(int $executionID = 0, int $productID = 0, string|int $branch = 0, string $orderBy = 't1.`order`_desc', string $type = 'byModule', string $param = '0', string $storyType = 'story', array|string $excludeStories = '', object|null $pager = null) + public function getExecutionStories(int $executionID = 0, int $productID = 0, string $orderBy = 't1.`order`_desc', string $type = 'byModule', string $param = '0', string $storyType = 'story', array|string $excludeStories = '', object|null $pager = null) { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getExecutionStories(); @@ -255,7 +254,7 @@ class storyModel extends model ->andWhere('t2.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) ->beginIF($excludeStories)->andWhere('t2.id')->notIN($excludeStories)->fi() - ->beginIF($this->session->storyBrowseType and strpos('changing|', $this->session->storyBrowseType) !== false)->andWhere('t2.status')->in(array_keys($unclosedStatus))->fi() + ->beginIF($this->session->storyBrowseType and strpos('changing|', $this->session->storyBrowseType) !== false)->andWhere('t2.status')->in($this->storyTao->getUnclosedStatusKeys())->fi() ->beginIF($modules)->andWhere('t2.module')->in($modules)->fi(); /* 根据传入的 ID 是项目还是执行分别查询需求。 */ @@ -5222,7 +5221,7 @@ class storyModel extends model $excludeStories = $this->storyTao->getSubdividedStoriesByProduct($productID); if($projectID) { - $stories = $this->getExecutionStories($projectID, $productID, $branch, '`order`_desc', 'all', 0, 'story', $excludeStories, $this->config->URAndSR ? null : $pager); + $stories = $this->getExecutionStories($projectID, $productID, '`order`_desc', 'all', 0, 'story', $excludeStories, $this->config->URAndSR ? null : $pager); } else { @@ -5279,7 +5278,7 @@ class storyModel extends model /* 获取关联项目的研发需求。*/ $projectStories = array(); - if($projectID) $projectStories = $this->getExecutionStories($projectID, $productID, $branch, '`order`_desc', 'all', 0, 'story'); + if($projectID) $projectStories = $this->getExecutionStories($projectID, $productID, '`order`_desc', 'all', 0, 'story'); /* 获取用户需求细分的研发需求。 */ $requirementStories = $this->storyTao->batchGetRelations(array_keys($requirements), 'requirement', array('id', 'title', 'parent'));