From b905ccead611736cdfdb0d84367ea5c1b3193c74 Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 13 Jul 2022 01:38:10 +0000 Subject: [PATCH] sprint_60477 --- module/bug/control.php | 10 ++++++++-- module/projectrelease/view/view.html.php | 2 +- module/release/view/view.html.php | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 9dc2fb97dc..29d4fd4ffa 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -2022,12 +2022,14 @@ class bug extends control /** * Batch close bugs. * + * @param int $releaseID + * @param string $viewType * @access public * @return void */ - public function batchClose() + public function batchClose($releaseID = '', $viewType = '') { - if($this->post->unlinkBugs) $this->post->bugIDList = $this->post->unlinkBugs; + if($releaseID) $this->post->bugIDList = $this->post->unlinkBugs; if($this->post->bugIDList) { $bugIDList = $this->post->bugIDList; @@ -2052,6 +2054,10 @@ class bug extends control } $this->loadModel('score')->create('ajax', 'batchOther'); if(isset($skipBugs)) echo js::alert(sprintf($this->lang->bug->skipClose, join(',', $skipBugs))); + if($viewType) + { + return print(js::locate($this->createLink($viewType, 'view', "releaseID=$releaseID&type=bug"), 'parent')); + } } return print(js::reload('parent')); } diff --git a/module/projectrelease/view/view.html.php b/module/projectrelease/view/view.html.php index e478f68b13..caca4f25dd 100644 --- a/module/projectrelease/view/view.html.php +++ b/module/projectrelease/view/view.html.php @@ -220,7 +220,7 @@ } if($canBatchClose and $canBeChanged) { - $closeURL = $this->createLink('bug', 'batchClose'); + $closeURL = $this->createLink('bug', 'batchClose', "releaseID=$release->id&viewType=projectrelease"); echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"hiddenwin\", this)' class='btn'"); } ?> diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index 63a300191f..2b753f8408 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -222,7 +222,7 @@ } if($canBatchClose) { - $closeURL = $this->createLink('bug', 'batchClose'); + $closeURL = $this->createLink('bug', 'batchClose', "release=$release->id&viewType=release"); echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"hiddenwin\", this)' class='btn'"); } ?>