@@ -153,9 +151,9 @@ type != 'normal' and isset($branchGroups[$product->id]);?>
'> product->common;?> - division) ? "disabled='disabled'" : '';?> + division) ? "disabled='disabled'" : '';?> id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> - division) echo html::hidden("products[$i]", $product->id);?> + division) echo html::hidden("products[$i]", $product->id);?>
'> @@ -171,7 +169,7 @@
> product->plan;?> id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), isset($product->plans) ? $product->plans : '', "class='form-control chosen' multiple");?> - division)):?> + division)):?>
> @@ -209,7 +207,7 @@
product->plan;?> - division)):?> + division)):?>
From 0ad1aba2eeb694a98a329fc9c3815856372babf0 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 08:38:13 +0000 Subject: [PATCH 09/13] * Fix bug #32255. --- module/programplan/model.php | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 4c6043071c..e1789a1369 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -833,6 +833,22 @@ class programplanModel extends model } } + $linkProducts = array(); + $linkBranches = array(); + $productList = $this->loadModel('product')->getProducts($projectID); + if($project->division) + { + $linkProducts = array(0 => $productID); + $linkBranches = array(0 => $productList[$productID]->branches); + } + else + { + $linkProducts = array_keys($productList); + foreach($linkProducts as $index => $productID) $linkBranches[$index] = $productList[$productID]->branches; + } + $this->post->set('products', $linkProducts); + $this->post->set('branch', $linkBranches); + foreach($datas as $data) { /* Set planDuration and realDuration. */ @@ -846,6 +862,7 @@ class programplanModel extends model $data->days = helper::diffDate($data->end, $data->begin) + 1; $data->order = current($orders); + if($data->id) { $stageID = $data->id; @@ -985,22 +1002,6 @@ class programplanModel extends model $this->computeProgress($stageID, 'create'); } } - - $linkProducts = array(); - $linkBranches = array(); - $productList = $this->loadModel('product')->getProducts($projectID); - if($project->division) - { - $linkProducts = array(0 => $productID); - $linkBranches = array(0 => $productList[$productID]->branches); - } - else - { - $linkProducts = array_keys($productList); - foreach($linkProducts as $index => $productID) $linkBranches[$index] = $productList[$productID]->branches; - } - $this->post->set('products', $linkProducts); - $this->post->set('branch', $linkBranches); $this->execution->updateProducts($stageID); /* If child plans has milestone, update parent plan set milestone eq 0 . */ From c28161fb0d58f7f823b4c26e6363831086383dd9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 09:15:04 +0000 Subject: [PATCH 10/13] * Fix bug of create project. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 59b321bc28..69e732bcef 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1236,7 +1236,7 @@ class projectModel extends model ->setIF($this->post->delta == 999, 'days', 0) ->setIF($this->post->acl == 'open', 'whitelist', '') ->setIF(!isset($_POST['whitelist']), 'whitelist', '') - ->setDefault('multiple', '1') + ->setIF(!isset($_POST['multiple']), 'multiple', '1') ->setDefault('openedBy', $this->app->user->account) ->setDefault('openedDate', helper::now()) ->setDefault('team', $this->post->name) From 09cb859c5e1cc8adef0660d784b0111fde79f3a7 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 09:30:25 +0000 Subject: [PATCH 11/13] * Fix bug #32179. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 0dfdf4a832..30ddc77468 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -489,7 +489,7 @@ class actionModel extends model elseif($actionName == 'importedcard') { $title = $this->dao->select('name')->from(TABLE_KANBAN)->where('id')->eq($action->extra)->fetch('name'); - if($title) $action->extra = common::hasPriv('kanban', 'view') ? html::a(helper::createLink('kanban', 'view', "kanbanID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; + if($title) $action->extra = (common::hasPriv('kanban', 'view') and !isonlybody()) ? html::a(helper::createLink('kanban', 'view', "kanbanID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; } elseif($actionName == 'createchildren') { From fb57e0f9949c955e5c2c9fab1f42341421e84d71 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Sat, 18 Feb 2023 09:42:58 +0000 Subject: [PATCH 12/13] * Fix bug #32167. --- module/story/js/edit.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/story/js/edit.js b/module/story/js/edit.js index 2b8602a7b2..a5f7462886 100644 --- a/module/story/js/edit.js +++ b/module/story/js/edit.js @@ -95,4 +95,9 @@ $(function() { $('#planIdBox .chosen-container').find('div').css('width', $('#planIdBox').width()) }); + + $('#parent_chosen').click(function() + { + $('#parent_chosen').find('div').css('width', $('#parent_chosen').width()) + }); }) From 06220e4f1f9c20325650d592d5271b8525bc07ee Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 20 Feb 2023 08:34:19 +0800 Subject: [PATCH 13/13] * Fix lower php version error. --- module/execution/view/story.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index be7a90e189..4c13d81f1c 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -411,7 +411,8 @@