diff --git a/module/mr/model.php b/module/mr/model.php index 3a538a7e25..7506d041d3 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -1733,10 +1733,10 @@ class mrModel extends model } else { - $projectID = $MR->projectID; + $projectID = $MR->targetProject; $MRID = $MR->mriid; - if($host->type == 'gitlab') $url = sprintf($this->loadModel('gitlab')->getApiRoot($this->hostID), "/projects/$projectID/merge_requests/$MRID/commits"); - if($host->type == 'gitea') $url = sprintf($this->loadModel('gitea')->getApiRoot($this->hostID), "/repos/$projectID/pulls/$MRID/commits"); + if($host->type == 'gitlab') $url = sprintf($this->loadModel('gitlab')->getApiRoot($MR->hostID), "/projects/$projectID/merge_requests/$MRID/commits"); + if($host->type == 'gitea') $url = sprintf($this->loadModel('gitea')->getApiRoot($MR->hostID), "/repos/$projectID/pulls/$MRID/commits"); return json_decode(commonModel::http($url)); } } diff --git a/module/mr/view/link.html.php b/module/mr/view/link.html.php index f9350b3730..57ffa878a5 100644 --- a/module/mr/view/link.html.php +++ b/module/mr/view/link.html.php @@ -89,7 +89,7 @@ ?> createLink('story', 'view', "storyID=$story->id"); + $viewLink = $this->createLink('story', 'view', "storyID=$story->id", '', true); $totalEstimate += $story->estimate; ?> @@ -102,7 +102,7 @@ parent > 0) echo "story->children}>{$lang->story->childrenAB}"; - echo html::a($viewLink , $story->title); + echo html::a($viewLink , $story->title, '', 'class="iframe"'); ?> openedBy);?> @@ -168,7 +168,7 @@ id);?> bug->priList, $bug->pri, $bug->pri);?> - createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> + createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', 'class="iframe"');?> openedBy);?> assignedTo);?> @@ -230,7 +230,7 @@ id);?> task->priList, $task->pri, $task->pri);?> - createLink('task', 'view', "taskID=$task->id"), $task->name);?> + createLink('task', 'view', "taskID=$task->id", '', true), $task->name, '', 'class="iframe"');?> finishedBy);?> assignedTo);?>