From 315dc169804e4a63f3e6897cadd6b53056ff6f09 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 1 Dec 2022 14:04:26 +0800 Subject: [PATCH 1/6] master branch only relation master plan --- module/product/control.php | 2 +- module/story/control.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 0529cfcd88..eeb0a20594 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -1048,7 +1048,7 @@ class product extends control $multiple = strpos($param, 'multiple') === false ? '' : 'multiple'; $output = html::select($field, $plans, $planID, "class='form-control chosen' $multiple"); - if($branch == 0 and strpos($param, 'edit') and !strpos($param, 'forstory')) $output = html::select($field, $plans, $planID, "class='form-control chosen' multiple"); + if($branch == 0 and strpos($param, 'edit') and (strpos($param, 'forstory') === false)) $output = html::select($field, $plans, $planID, "class='form-control chosen' multiple"); if(count($plans) == 1 and $needCreate and $needCreate !== 'false') { diff --git a/module/story/control.php b/module/story/control.php index 72670a7d46..9ceddf2c19 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -440,7 +440,8 @@ class story extends control $this->view->users = $users; $this->view->moduleID = $moduleID; $this->view->moduleOptionMenu = $moduleOptionMenu; - $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '' : $branch, 'skipParent|unexpired|noclosed')); + $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '0' : $branch, 'skipParent|unexpired|noclosed')); + a($this->view->plans);exit; $this->view->planID = $planID; $this->view->source = $source; $this->view->sourceNote = $sourceNote; From 658144ab3a3336e01fe2f5bdef5f953cdd27e28e Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 1 Dec 2022 14:04:55 +0800 Subject: [PATCH 2/6] master branch only relation master plan --- module/story/control.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index 9ceddf2c19..90a612488d 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -441,7 +441,6 @@ class story extends control $this->view->moduleID = $moduleID; $this->view->moduleOptionMenu = $moduleOptionMenu; $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '0' : $branch, 'skipParent|unexpired|noclosed')); - a($this->view->plans);exit; $this->view->planID = $planID; $this->view->source = $source; $this->view->sourceNote = $sourceNote; From 7535a681280cdf15d10ebf124fd64ec32b2903fe Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 1 Dec 2022 14:07:43 +0800 Subject: [PATCH 3/6] rollback code --- module/story/control.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 90a612488d..f2e1fa60fa 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -440,8 +440,7 @@ class story extends control $this->view->users = $users; $this->view->moduleID = $moduleID; $this->view->moduleOptionMenu = $moduleOptionMenu; - $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '0' : $branch, 'skipParent|unexpired|noclosed')); - $this->view->planID = $planID; + $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '' : $branch, 'skipParent|unexpired|noclosed')); $this->view->planID = $planID; $this->view->source = $source; $this->view->sourceNote = $sourceNote; $this->view->color = $color; From 1651a1492e19511baeb489725af16a38ab88499e Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 1 Dec 2022 14:23:31 +0800 Subject: [PATCH 4/6] edit story fix empty --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index bb95eea787..e4ff3f4f38 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -889,7 +889,7 @@ class storyModel extends model return false; } - $storyPlan = !empty($_POST['plan']) ? $_POST['plan'] : array(); + $storyPlan = !empty($_POST['plan']) ? array_filter($_POST['plan']) : array(); if(count($storyPlan) > 1) { $oldStoryPlan = !empty($oldStory->planTitle) ? array_keys($oldStory->planTitle) : array(); From f7c3965d57add14819a851fe1c0907f4f40b3534 Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 1 Dec 2022 14:23:39 +0800 Subject: [PATCH 5/6] * Fix bug #30373. --- module/story/lang/de.php | 2 +- module/story/lang/en.php | 2 +- module/story/lang/fr.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/story/lang/de.php b/module/story/lang/de.php index a102071878..7111526b98 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -12,7 +12,7 @@ global $config; $lang->story->create = "Story hinzufügen"; -$lang->story->requirement = zget($lang, 'URCommon', "Requirement"); +$lang->story->requirement = 'UR'; $lang->story->story = zget($lang, 'SRCommon', "Story"); $lang->story->createStory = 'Create ' . $lang->story->story; $lang->story->createRequirement = 'Create ' . $lang->story->requirement; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 17ae16c93a..664d1a114b 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -12,7 +12,7 @@ global $config; $lang->story->create = "Create Story"; -$lang->story->requirement = zget($lang, 'URCommon', "Requirement"); +$lang->story->requirement = 'UR'; $lang->story->story = zget($lang, 'SRCommon', "Story"); $lang->story->createStory = 'Create ' . $lang->story->story; $lang->story->createRequirement = 'Create ' . $lang->story->requirement; diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php index b05c47cf17..e11cd9a62c 100644 --- a/module/story/lang/fr.php +++ b/module/story/lang/fr.php @@ -12,7 +12,7 @@ global $config; $lang->story->create = "Créer Story"; -$lang->story->requirement = zget($lang, 'URCommon', "Requirement"); +$lang->story->requirement = 'UR'; $lang->story->story = zget($lang, 'SRCommon', "Story"); $lang->story->createStory = 'Create ' . $lang->story->story; $lang->story->createRequirement = 'Create ' . $lang->story->requirement; From c4b508dd06c30267853972f402ac7c8602172de1 Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 1 Dec 2022 14:27:07 +0800 Subject: [PATCH 6/6] * Fix bug #30422. --- module/productplan/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/productplan/control.php b/module/productplan/control.php index d8d8f76643..a597de93d1 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -947,7 +947,7 @@ class productplan extends control */ public function ajaxGetConflict($planID, $newBranch) { - if(empty($newBranch)) return; + if($newBranch != '') return; $plan = $this->productplan->getByID($planID); $oldBranch = $plan->branch;