diff --git a/module/mr/model.php b/module/mr/model.php index 935bfdc44e..2bb641bc74 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -1267,6 +1267,7 @@ class mrModel extends model return $this->dao->select("t2.id,t2.title")->from(TABLE_RELATION)->alias('t1') ->leftJoin(TABLE_MR)->alias('t2')->on('t1.AID = t2.id') ->where('t1.AType')->eq('mr') + ->andWhere('t1.BType')->eq($objectType) ->andWhere('t1.BID')->eq($objectID) ->fetchPairs(); } diff --git a/module/mr/view/link.html.php b/module/mr/view/link.html.php index c262074e44..ca9c0c33bf 100644 --- a/module/mr/view/link.html.php +++ b/module/mr/view/link.html.php @@ -168,7 +168,7 @@ id);?> bug->priList, $bug->pri, $bug->pri);?> - createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', 'data-app="product"');?> + createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> openedBy);?> assignedTo);?> diff --git a/module/story/control.php b/module/story/control.php index d7bd5edc46..85b5b0b843 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1014,6 +1014,7 @@ class story extends control $bugs = $this->dao->select('id,title')->from(TABLE_BUG)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll(); $fromBug = $this->dao->select('id,title')->from(TABLE_BUG)->where('toStory')->eq($storyID)->fetch(); $cases = $this->dao->select('id,title')->from(TABLE_CASE)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll(); + $linkedMRs = $this->loadModel('mr')->getLinkedMRPairs($storyID, 'story'); $modulePath = $this->tree->getParents($story->module); $storyModule = empty($story->module) ? '' : $this->tree->getById($story->module); @@ -1054,6 +1055,7 @@ class story extends control $this->view->fromBug = $fromBug; $this->view->cases = $cases; $this->view->story = $story; + $this->view->linkedMRs = $linkedMRs; $this->view->track = $this->story->getTrackByID($story->id); $this->view->users = $this->user->getPairs('noletter'); $this->view->reviewers = $reviewers; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index a9adae2caa..666f2dbf96 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -163,6 +163,7 @@ $lang->story->field = 'Sync Field'; $lang->story->completeRate = 'Completion Rate'; $lang->story->reviewed = 'Reviewed'; $lang->story->toBeReviewed = 'To Be Reviewed'; +$lang->story->linkMR = 'Related MRs'; $lang->story->ditto = 'Ditto'; $lang->story->dittoNotice = 'This story is not linked to the same product as the last one is!'; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 12a9b6aae6..b05db77036 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -163,6 +163,7 @@ $lang->story->field = '同步的字段'; $lang->story->completeRate = '完成率'; $lang->story->reviewed = '已评审'; $lang->story->toBeReviewed = '待评审'; +$lang->story->linkMR = '相关合并请求'; $lang->story->ditto = '同上'; $lang->story->dittoNotice = "该{$lang->SRCommon}与上一{$lang->SRCommon}不属于同一产品!"; diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 6795aa8542..cdcbc70bed 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -502,7 +502,7 @@ - story->legendFromBug;?> + story->legendFromBug;?>