From 5156963cece2435bada13278c0bebb5489a4be8c Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 7 Feb 2023 07:23:34 +0000 Subject: [PATCH 1/3] * Adjust code for 329. --- module/bug/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 1fea4f9807..98408efe60 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -565,8 +565,9 @@ class bug extends control } else { - $builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'noempty,noterminate,nodone,withbranch,noreleased'); - $stories = $this->story->getProductStoryPairs($productID, $branch, 0, 'all','id_desc', 0, 'full', 'story', false); + $moduleID = $moduleID ? $moduleID : 0; + $builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'noempty,noterminate,nodone,withbranch,noreleased'); + $stories = $this->story->getProductStoryPairs($productID, $branch, $moduleID, 'all','id_desc', 0, 'full', 'story', false); } $moduleOwner = $this->bug->getModuleOwner($moduleID, $productID); From bf85280dcd4ef393d8d1014cfe567f06f7c2ac60 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 8 Feb 2023 02:07:02 +0000 Subject: [PATCH 2/3] * Adjust code for 329. --- module/story/model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/story/model.php b/module/story/model.php index 45ce2b584b..ad65094439 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3022,6 +3022,11 @@ class storyModel extends model */ public function getProductStoryPairs($productID = 0, $branch = 'all', $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story', $hasParent = true) { + if($moduleIdList) + { + $moduleInfo = $this->loadModel('tree')->getByID($moduleIdList); + $moduleIdList = $moduleInfo->type == bug ? 0 : $moduleIdList; + } $stories = $this->dao->select('t1.id, t1.title, t1.module, t1.pri, t1.estimate, t2.name AS product') ->from(TABLE_STORY)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') ->where('1=1') From 7342444023f6a99e535d8501a3c8c7edb7b28dff Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 8 Feb 2023 02:24:05 +0000 Subject: [PATCH 3/3] * Adjust code for 329. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index ad65094439..391168a6f9 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3025,7 +3025,7 @@ class storyModel extends model if($moduleIdList) { $moduleInfo = $this->loadModel('tree')->getByID($moduleIdList); - $moduleIdList = $moduleInfo->type == bug ? 0 : $moduleIdList; + $moduleIdList = $moduleInfo->type == 'bug' ? 0 : $moduleIdList; } $stories = $this->dao->select('t1.id, t1.title, t1.module, t1.pri, t1.estimate, t2.name AS product') ->from(TABLE_STORY)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')