From ab0922e0901e7b07ff5af1e25a57e436a2d7d089 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 4 Jul 2024 08:28:36 +0000 Subject: [PATCH] * [bug#52151,done,0.2h] fix bug. --- module/execution/js/kanban.ui.js | 2 ++ module/kanban/model.php | 2 +- module/kanban/tao.php | 6 +++++- module/story/model.php | 6 +----- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/module/execution/js/kanban.ui.js b/module/execution/js/kanban.ui.js index 7a69cbac4a..55b1edc2e5 100644 --- a/module/execution/js/kanban.ui.js +++ b/module/execution/js/kanban.ui.js @@ -109,6 +109,8 @@ window.buildColCardActions = function(col) let laneID = 0; if($group.length) laneID = $group.find('.kanban-lane.is-first').attr('z-lane'); + if(col.laneType == 'parentStory') return []; + if(col.type == 'backlog') { if(priv.canCreateStory) diff --git a/module/kanban/model.php b/module/kanban/model.php index 26dca3a80d..d15c360eb7 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1405,7 +1405,7 @@ class kanbanModel extends model if(empty($object)) continue; if($cell->type == 'parentStory' && $object->isParent != '1') continue; - if($cell->type == 'story' && $object->isParent == '1') continue; + if($cell->type == 'story' && $object->isParent == '1') continue; $cardData = $this->kanbanTao->initCardItem($object, $cell, $order, $avatarPairs, $users); $cardData['acl'] = 'open'; diff --git a/module/kanban/tao.php b/module/kanban/tao.php index 1323fff19f..3b34e760de 100644 --- a/module/kanban/tao.php +++ b/module/kanban/tao.php @@ -479,7 +479,11 @@ class kanbanTao extends kanbanModel } } - foreach($cols as $colIndex => $col) $cols[$colIndex]['cards'] = isset($columnCount[$col['id']]) ? $columnCount[$col['id']] : 0; + foreach($cols as $colIndex => $col) + { + $cols[$colIndex]['cards'] = isset($columnCount[$col['id']]) ? $columnCount[$col['id']] : 0; + $cols[$colIndex]['laneType'] = $lane['type']; + } $lanes = array_values($lanes); $laneCount += count($lanes); diff --git a/module/story/model.php b/module/story/model.php index 313d875d60..81c2048f07 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3644,11 +3644,7 @@ class storyModel extends model global $app, $config; $action = strtolower($action); - if($action == 'subdivide') - { - if(helper::isAjaxRequest('modal')) return false; - $action = 'batchcreate'; - } + if($action == 'subdivide') $action = 'batchcreate'; if($action == 'recall') return $story->status == 'reviewing' || $story->status == 'changing'; if($action == 'close') return $story->status != 'closed';