From 892b7d6b8a8e996c604d29795de33525c2bf8503 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 03:31:00 +0000 Subject: [PATCH 1/2] * Fix bug #82220. --- module/execution/control.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index bb833b35e9..ef5404be22 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1678,8 +1678,14 @@ class execution extends control } $importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory; + if(!$execution->hasProduct) + { + return print(js::locate(inlink('create', "projectID=$projectID&executionID=$executionID"))); + }else + { + return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); - return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); + } } } From 06700413b1a7ff2d40ea8098c06d06a7f7ab6199 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 05:54:47 +0000 Subject: [PATCH 2/2] * Adjust code. --- module/execution/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index ef5404be22..064bc06fe2 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1681,7 +1681,8 @@ class execution extends control if(!$execution->hasProduct) { return print(js::locate(inlink('create', "projectID=$projectID&executionID=$executionID"))); - }else + } + else { return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID")));