From 685a583d99389893fea5513651fe7969dd24b939 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 18 Apr 2022 10:50:50 +0800 Subject: [PATCH 1/2] * Fix bug #17551. --- module/project/view/create.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index 502c307ad0..430b55fc30 100644 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -125,7 +125,7 @@ project->addProduct, '', "onchange=addNewProduct(this);");?> -
+
From ab1ad4051b4b900777e3ea5be78d618e9416f7e9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 18 Apr 2022 11:21:54 +0800 Subject: [PATCH 2/2] * Fix bug #21682. --- module/bug/control.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 6e7f304116..4decd84b84 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -571,7 +571,7 @@ class bug extends control if($projectID) { $project = $this->loadModel('project')->getByID($projectID); - $projects = array($projectID => $project->name); + if(empty($bugID)) $projects = array($projectID => $project->name); } } elseif($projectID) @@ -581,7 +581,7 @@ class bug extends control foreach($productList as $product) $products[$product->id] = $product->name; $project = $this->loadModel('project')->getByID($projectID); - $projects += array($projectID => $project->name); + if(empty($bugID)) $projects += array($projectID => $project->name); /* Set project menu. */ if($this->app->tab == 'project') $this->project->setMenu($projectID); @@ -591,6 +591,9 @@ class bug extends control $projects += $this->product->getProjectPairsByProduct($productID, $branch); } + /* When copying bug, get all project linked to the product. */ + if(!empty($bugID)) $projects += $this->product->getProjectPairsByProduct($productID, $branch); + /* Get block id of assinge to me. */ $blockID = 0; if(isonlybody())