This commit is contained in:
chenfei
2020-07-06 16:08:25 +08:00
parent 48e1b9becc
commit 3549b2a338
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -2666,11 +2666,12 @@ class storyModel extends model
if($story->parent < 0 and $action != 'edit' and $action != 'batchcreate') return false;
if($action == 'change') return $story->status != 'closed';
if($action == 'review') return $story->status == 'draft' or $story->status == 'changed';
if($action == 'close') return $story->status != 'closed';
if($action == 'activate') return $story->status == 'closed';
if($action == 'assignto') return $story->status != 'closed';
if($action == 'change') return $story->status != 'closed';
if($action == 'review') return $story->status == 'draft' or $story->status == 'changed';
if($action == 'close') return $story->status != 'closed';
if($action == 'activate') return $story->status == 'closed';
if($action == 'assignto') return $story->status != 'closed';
if($action == 'createcase') return $story->type != 'requirement';
if($action == 'batchcreate' and $story->parent > 0) return false;
if($action == 'batchcreate' and $story->type == 'requirement') return $story->status != 'draft';
if($action == 'batchcreate' and ($story->status != 'active' or $story->stage != 'wait')) return false;
+1 -1
View File
@@ -136,7 +136,7 @@
common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
if($config->global->flow != 'onlyStory' and !isonlybody() and $story->parent >= 0 and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate')))
if($config->global->flow != 'onlyStory' and !isonlybody() and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate')))
{
$this->app->loadLang('testcase');
echo "<div class='btn-group dropup'>";