From 29363dae9bde5cbac26809773057671d496211d6 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 12 Jun 2024 10:49:55 +0800 Subject: [PATCH] * [task#120516,done,1h] The bug cannot be seen in the resolved build after change the bug resolved build. --- module/bug/ui/edit.html.php | 2 +- module/bug/zen.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/bug/ui/edit.html.php b/module/bug/ui/edit.html.php index 9afc25397b..fc963e20c5 100644 --- a/module/bug/ui/edit.html.php +++ b/module/bug/ui/edit.html.php @@ -18,7 +18,7 @@ jsVar('confirmChangeProduct', $lang->bug->notice->confirmChangeProduct); jsVar('moduleID', $bug->module); jsVar('tab', $this->app->tab); jsVar('released', $lang->build->released); -jsVar('confirmUnlinkBuild', sprintf($lang->bug->notice->confirmUnlinkBuild, zget($resolvedBuilds, $bug->resolvedBuild))); +jsVar('confirmUnlinkBuild', sprintf($lang->bug->notice->confirmUnlinkBuild, zget($resolvedBuildPairs, $bug->resolvedBuild))); jsVar('projectExecutionPairs', $projectExecutionPairs); jsVar('edition', $config->edition); diff --git a/module/bug/zen.php b/module/bug/zen.php index 6d115c9d21..f9aba39ce2 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1235,13 +1235,13 @@ class bugZen extends bug $cases = $this->loadmodel('testcase')->getPairsByProduct($bug->product, array(0, $bug->branch), $case->title, $this->config->maxCount); } - $resolvedBuilds = $this->build->getBuildPairs(array($bug->product), $bug->branch, 'noempty'); - $resolvedBuilds = $this->build->addReleaseLabelForBuilds($bug->product, $resolvedBuilds); - $this->config->moreLinks['case'] = inlink('ajaxGetProductCases', "bugID={$bug->id}"); + $resolvedBuildPairs = $this->build->getBuildPairs(array($bug->product), $bug->branch, 'noempty'); + $this->view->resolvedBuildPairs = $resolvedBuildPairs; + $this->view->resolvedBuilds = $this->build->addReleaseLabelForBuilds($bug->product, $resolvedBuildPairs); + $this->view->openedBuilds = $openedBuilds; - $this->view->resolvedBuilds = $resolvedBuilds; $this->view->plans = $this->loadModel('productplan')->getPairs($bug->product, $bug->branch, '', true); $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false); $this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution); @@ -1964,7 +1964,7 @@ class bugZen extends bug /* Unlink old resolved build and link new resolved build. */ if($bug->resolution == 'fixed' && !empty($bug->resolvedBuild) && $bug->resolvedBuild != $oldBug->resolvedBuild) { - if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug($oldBug->resolvedBuild, $bug->id); + if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug((int)$oldBug->resolvedBuild, $bug->id); $this->bug->linkBugToBuild($bug->id, $bug->resolvedBuild); }