From 0e4beb8e4e8ccdaabd975b5f1619b94bcd1e37c1 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 31 May 2024 13:47:43 +0800 Subject: [PATCH] * [bug#50411,done,0.5h] fix batch create stories kanban position issue. --- module/execution/model.php | 2 +- module/story/control.php | 2 +- module/story/js/batchcreate.ui.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index bbe03817ca..b23a05cece 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2855,7 +2855,7 @@ class executionModel extends model $columnID = $this->kanban->getColumnIDByLaneID((int)$laneID, 'backlog'); if(empty($columnID)) $columnID = isset($output['columnID']) ? $output['columnID'] : 0; - if(!empty($laneID) and !empty($columnID)) $this->kanban->addKanbanCell($executionID, $laneID, $columnID, 'story', $storyID); + if(!empty($laneID) and !empty($columnID)) $this->kanban->addKanbanCell($executionID, (int)$laneID, (int)$columnID, 'story', (string)$storyID); $data = new stdclass(); $data->project = $executionID; diff --git a/module/story/control.php b/module/story/control.php index 384cbb5c76..e2b03ece0a 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -151,7 +151,7 @@ class story extends control $products = array(); foreach($storyIdList as $i => $newStoryID) { - if(isset($_POST['lanes'])) $lanes[$newStoryID] = $_POST['lanes'][$i]; + if(isset($stories[$i]) && !empty($stories[$i]->lane)) $lanes[$newStoryID] = $stories[$i]->lane; $products[$newStoryID] = $productID; } diff --git a/module/story/js/batchcreate.ui.js b/module/story/js/batchcreate.ui.js index cbec3ccc2f..b9101ada46 100644 --- a/module/story/js/batchcreate.ui.js +++ b/module/story/js/batchcreate.ui.js @@ -45,7 +45,7 @@ window.changeRegion = function(e) $.getJSON(laneLink, function(data) { const laneID = data.items.length > 0 ? data.items[0].value : ''; - $region.closest('tr').find('[name^=lane]').zui('picker').render(data); + $region.closest('tr').find('[name^=lane]').zui('picker').render({items: data.items}); $region.closest('tr').find('[name^=lane]').zui('picker').$.setValue(laneID); });