From 3e70b882104a049062b9d77dddd2acc7392f5f57 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Tue, 29 Mar 2022 14:49:01 +0800 Subject: [PATCH 1/3] * Fix bug #18270. --- module/execution/model.php | 8 -------- module/execution/view/create.html.php | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index cd6c878de0..6c94f5653f 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -305,14 +305,6 @@ class executionModel extends model $type = 'sprint'; if($project) $type = zget($this->config->execution->modelList, $project->model, 'sprint'); - /* If the execution model is a stage, determine whether the product is linked. */ - $products = array_filter($this->post->products); - if(empty($products)) - { - dao::$errors['message'][] = $this->lang->execution->noLinkProduct; - return false; - } - $this->config->execution->create->requiredFields .= ',project'; } diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index fef68cc881..cce35666a4 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -144,8 +144,8 @@
-
- +
+
From c7e76c117651a8f8187041c92ddd2069757c8433 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 30 Mar 2022 13:05:59 +0800 Subject: [PATCH 2/3] * Fix bug #18270. --- module/execution/model.php | 8 +------- module/execution/view/edit.html.php | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 6c94f5653f..9ea9d26e07 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -460,13 +460,7 @@ class executionModel extends model dao::$errors['days'] = sprintf($this->lang->project->workdaysExceed, $workdays); return false; } - $products = array_filter($this->post->products); - $noLinkTip = $oldExecution->type != 'kanban' ? $this->lang->execution->noLinkProduct : $this->lang->execution->kanbanNoLinkProduct; - if(empty($products)) - { - dao::$errors['message'][] = $noLinkTip; - return false; - } + /* Get the data from the post. */ $execution = fixer::input('post') ->setDefault('lastEditedBy', $this->app->user->account) diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index aba139060f..56ead0a3f4 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -141,7 +141,7 @@ type != 'normal' and isset($branchGroups[$product->id]);?> id] as $branchID => $branch):?>
-
"> +
id, "class='form-control chosen' $class onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='". $product->type ."'");?> id], $branchID, "class='form-control chosen' $class onchange=\"loadPlans('#products{$i}', this.value)\" data-last='" . $branchID . "'");?> @@ -159,7 +159,7 @@
- +
From af7f9bd8e3a74f6f127de683a5335aa58c0af4e6 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 30 Mar 2022 20:22:17 +0800 Subject: [PATCH 3/3] * Fix bug#18270. --- module/execution/control.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index d4ef2cbb54..5d47dfe10f 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2549,13 +2549,6 @@ class execution extends control if(!empty($_POST)) { - /* Get executionType and determine whether a product is linked with the stage. */ - $executionType = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch('type'); - if($executionType == 'stage') - { - if(!isset($_POST['products'])) return print(js::alert($this->lang->execution->noLinkProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from"))); - } - $oldProducts = $this->product->getProducts($executionID); if($from == 'buildCreate' && $this->session->buildCreate) $browseExecutionLink = $this->session->buildCreate;