From 7f90361e59ea30a46213d1183719b9a9b5eee95b Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 25 Aug 2022 03:30:54 +0000 Subject: [PATCH] * Fix sprint231 bugs --- module/story/control.php | 4 ++++ module/story/js/edit.js | 6 ++++++ module/story/view/batchclose.html.php | 4 ++-- module/story/view/edit.html.php | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 430e243ea7..f5ec022331 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -853,6 +853,9 @@ class story extends control /* Process the module when branch products are switched to normal products. */ if($product->type == 'normal' and !empty($story->branch)) $this->view->moduleOptionMenu += $this->tree->getModulesName($story->module); + $branch = $product->type == 'branch' ? ($story->branch > 0 ? $story->branch : '0') : 'all'; + $productStories = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, ''); + $this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title; $this->view->position[] = $this->lang->story->edit; $this->view->story = $story; @@ -861,6 +864,7 @@ class story extends control $this->view->product = $product; $this->view->plans = $this->loadModel('productplan')->getPairsForStory($story->product, $story->branch == 0 ? 'all' : $story->branch, 'skipParent'); $this->view->products = $products; + $this->view->productStories = $productStories; $this->view->branchOption = $branchOption; $this->view->branchTagOption = $branchTagOption; $this->view->reviewers = array_keys($reviewerList); diff --git a/module/story/js/edit.js b/module/story/js/edit.js index 852681c02f..8f012085db 100644 --- a/module/story/js/edit.js +++ b/module/story/js/edit.js @@ -79,4 +79,10 @@ $(function() var modalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '95%', url: link}); modalTrigger.show(); }); + + $('#duplicateStory').picker( + { + disableEmptySearch : true, + dropWidth : 'auto' + }); }) diff --git a/module/story/view/batchclose.html.php b/module/story/view/batchclose.html.php index 0c27cb184f..3125507ffe 100755 --- a/module/story/view/batchclose.html.php +++ b/module/story/view/batchclose.html.php @@ -38,12 +38,12 @@ processStatus('story', $story);?> status == 'draft') unset($reasonList['cancel']);?> - +
-
' closedReason != 'duplicate') echo "style='display:none'";?>> + ' closedReason != 'duplicate') echo "style='display:none'";?>> product][$story->branch], $story->duplicateStory, "class='form-control' placeholder='{$lang->idAB}'");?> ' closedReason != 'subdivided') echo "style='display:none'";?>> diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 7ba57f8114..cf0718f6ab 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -285,7 +285,7 @@ - +
story->duplicateStory;?>duplicateStory == 0 ? '' : $story->duplicateStory, "class='form-control'");?>duplicateStory, 'class="form-control"'); ?>
story->linkStory;?>