From 6a85ed1d6f2bb7335db393e7991bd1bcf4d247ef Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 29 Sep 2022 06:56:02 +0000 Subject: [PATCH] * Fix bug#28011 --- module/bug/control.php | 2 ++ module/bug/view/batchedit.html.php | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index 99dd327aaa..823129e4d2 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1158,6 +1158,7 @@ class bug extends control $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); + if(isset($productBugs[$bugID])) unset($productBugs[$bugID]); $this->view->bug = $bug; $this->view->productID = $productID; @@ -1814,6 +1815,7 @@ class bug extends control $product = $this->loadModel('product')->getById($productID); $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); + if(isset($productBugs[$bugID])) unset($productBugs[$bugID]); $this->bug->checkBugExecutionPriv($bug); $this->qa->setMenu($this->products, $productID, $bug->branch); diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index f1e9c9c348..89d343479d 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -143,7 +143,11 @@ resolution, "class='form-control' onchange=setDuplicate(this.value,$bugID)");?> ' resolution != 'duplicate') echo "style='display:none'";?>> - product][$bug->branch], $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?> + product][$bug->branch]; + if(isset($productBugs[$bug->id])) unset($productBugs[$bug->id]); + ?> + duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>