From 94de5b73137b47518f17aec0c7d21c0447a01dc2 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 19 Apr 2024 09:25:18 +0800 Subject: [PATCH] * Fix bug #47847. --- module/story/config.php | 2 +- module/story/model.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/story/config.php b/module/story/config.php index 9a08bea149..544ce07824 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -91,7 +91,7 @@ $config->story->actionList['review']['data-app'] = $app->tab; $config->story->actionList['subdivide']['icon'] = 'split'; $config->story->actionList['subdivide']['text'] = $lang->story->subdivide; $config->story->actionList['subdivide']['hint'] = $lang->story->subdivide; -$config->story->actionList['subdivide']['url'] = array('module' => 'story', 'method' => 'batchCreate', 'params' => 'productID={product}&branch={branch}&moduleID={module}&storyID={id}&executionID={executionID}&plan=0&storyType=story'); +$config->story->actionList['subdivide']['url'] = array('module' => 'story', 'method' => 'batchCreate', 'params' => 'productID={product}&branch={branch}&moduleID={module}&storyID={id}&executionID={execution}&plan=0&storyType=story'); $config->story->actionList['subdivide']['data-app'] = $app->tab; $config->story->actionList['assignTo']['icon'] = 'hand-right'; diff --git a/module/story/model.php b/module/story/model.php index f9959cc496..bfaecb40c4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3210,6 +3210,12 @@ class storyModel extends model global $app, $config; $action = strtolower($action); + if($action == 'subdivide') + { + if(helper::isAjaxRequest('modal') || $config->vision == 'lite') return false; + $action = 'batchcreate'; + } + if($action == 'recallchange') return $story->status == 'changing'; if($action == 'recall') return $story->status == 'reviewing'; if($action == 'close') return $story->status != 'closed'; @@ -3218,7 +3224,6 @@ class storyModel extends model if($action == 'batchcreate' && $story->parent > 0) return false; if($action == 'batchcreate' && !empty($story->twins)) return false; if($action == 'submitreview' && strpos('draft,changing', $story->status) === false) return false; - if($action == 'subdivide' && (!helper::isAjaxRequest('modal') || $config->vision != 'lite')) return false; if($action == 'batchcreate' && $story->type == 'requirement' && $story->status != 'closed') return strpos('draft,reviewing,changing', $story->status) === false; if($action == 'createtestcase' || $action == 'batchcreatetestcase') return $config->vision != 'lite' && $story->parent >= 0 && $story->type != 'requirement';