diff --git a/module/story/control.php b/module/story/control.php index 3a82686bd1..1fde5ca354 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1482,7 +1482,7 @@ class story extends control $this->view->product = $product; $this->view->story = $story; $this->view->actions = $this->action->getList('story', $storyID); - $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter', "$story->lastEditedBy,$story->openedBy"); + $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', "$story->lastEditedBy,$story->openedBy"); $this->view->reviewers = $reviewers; $this->view->isLastOne = count(array_diff(array_keys($reviewers), explode(',', $story->reviewedBy))) == 1 ? true : false; diff --git a/module/story/lang/de.php b/module/story/lang/de.php index d68a60cd42..fad214cbae 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -443,24 +443,19 @@ $lang->story->categoryList['experience'] = 'Experience'; $lang->story->categoryList['improve'] = 'Improve'; $lang->story->categoryList['other'] = 'Other'; -$lang->story->changeTip = 'This Story is under review and cannot be changed.'; +$lang->story->changeTip = 'Only active can be changed.'; $lang->story->reviewTip = array(); $lang->story->reviewTip['active'] = 'The Story is already active,no review requirements.'; $lang->story->reviewTip['notReviewer'] = 'You are not the reviewer of this Story and cannot perform review operations.'; $lang->story->reviewTip['reviewed'] = 'Reviewed'; -$lang->story->reviewTip['recalled'] = 'This Story has been withdrawn from review and cannot be reviewed.'; $lang->story->recallTip = array(); -$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.'; -$lang->story->recallTip['recalled'] = 'This Story has been withdrawn from review and cannot be cancelled.'; -$lang->story->recallTip['reviewed'] = 'The review process has been started and cannot be cancelled.'; -$lang->story->recallTip['notOpenedBy'] = 'You are not the Story creator and cannot cancel the operation.'; +$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.'; $lang->story->subDivideTip = array(); $lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.'; -$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.'; -$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.'; +$lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be subdivided.'; $lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.'; $lang->story->featureBar['browse']['all'] = $lang->all; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 8001b3e6e7..26f4d9f6ca 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -443,24 +443,19 @@ $lang->story->categoryList['experience'] = 'Experience'; $lang->story->categoryList['improve'] = 'Improve'; $lang->story->categoryList['other'] = 'Other'; -$lang->story->changeTip = 'This Story is under review and cannot be changed.'; +$lang->story->changeTip = 'Only active can be changed.'; $lang->story->reviewTip = array(); $lang->story->reviewTip['active'] = 'The Story is already active,no review requirements.'; $lang->story->reviewTip['notReviewer'] = 'You are not the reviewer of this Story and cannot perform review operations.'; $lang->story->reviewTip['reviewed'] = 'Reviewed'; -$lang->story->reviewTip['recalled'] = 'This Story has been withdrawn from review and cannot be reviewed.'; $lang->story->recallTip = array(); -$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.'; -$lang->story->recallTip['recalled'] = 'This Story has been withdrawn from review and cannot be cancelled.'; -$lang->story->recallTip['reviewed'] = 'The review process has been started and cannot be cancelled.'; -$lang->story->recallTip['notOpenedBy'] = 'You are not the Story creator and cannot cancel the operation.'; +$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.'; $lang->story->subDivideTip = array(); $lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.'; -$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.'; -$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.'; +$lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be subdivided.'; $lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.'; $lang->story->featureBar['browse']['all'] = $lang->all; diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php index 573de4d391..597dd2770b 100644 --- a/module/story/lang/fr.php +++ b/module/story/lang/fr.php @@ -443,24 +443,19 @@ $lang->story->categoryList['experience'] = 'Experience'; $lang->story->categoryList['improve'] = 'Improve'; $lang->story->categoryList['other'] = 'Other'; -$lang->story->changeTip = 'Cette Story est en cours de vérification et ne peut pas être modifiée.'; +$lang->story->changeTip = "Seules les exigences de l'état actif peuvent être modifiées."; $lang->story->reviewTip = array(); $lang->story->reviewTip['active'] = "Cette Story est déjà active, il n'y a pas de demande de révision."; $lang->story->reviewTip['notReviewer'] = "Vous n'êtes pas l'évaluateur de cette Story et ne pouvez pas effectuer d'opérations d'évaluation."; $lang->story->reviewTip['reviewed'] = "Révisé"; -$lang->story->reviewTip['recalled'] = "Cette Story a été retirée pour vérification, et l'opération de révision ne peut pas être effectuée."; $lang->story->recallTip = array(); -$lang->story->recallTip['actived'] = "Aucun processus de révision n'a été lancé pour cette Story, et il n'est pas nécessaire de révoquer l'opération."; -$lang->story->recallTip['recalled'] = "Cette Story a été retirée pour vérification, et l'opération ne peut pas être annulée."; -$lang->story->recallTip['reviewed'] = "Il est entré dans le processus de révision, et l'opération ne peut pas être annulée."; -$lang->story->recallTip['notOpenedBy'] = "Vous n'êtes pas l'initiateur de la révision et vous ne pouvez pas annuler l'opération."; +$lang->story->recallTip['actived'] = "Aucun processus de révision n'a été lancé pour cette Story, et il n'est pas nécessaire de révoquer l'opération."; $lang->story->subDivideTip = array(); $lang->story->subDivideTip['subStory'] = 'Les sous-stories ne peuvent pas être décomposées.'; -$lang->story->subDivideTip['planned'] = 'Cette Story est planifiée et ne peut être subdivisée.'; -$lang->story->subDivideTip['projected'] = 'Cette Story a été créée et ne peut être subdivisée.'; +$lang->story->subDivideTip['notWait'] = "L'exigence %s ne peut pas être subdivisée."; $lang->story->subDivideTip['notActive'] = "Cette Story n'est pas active et ne peut être subdivisée."; $lang->story->featureBar['browse']['all'] = $lang->all; diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php index 9226a926c0..b5e80d1bfc 100644 --- a/module/story/lang/vi.php +++ b/module/story/lang/vi.php @@ -435,24 +435,19 @@ $lang->story->categoryList['experience'] = 'Experience'; $lang->story->categoryList['improve'] = 'Improve'; $lang->story->categoryList['other'] = 'Other'; -$lang->story->changeTip = 'This Story is under review and cannot be changed.'; +$lang->story->changeTip = 'Only active can be changed.'; $lang->story->reviewTip = array(); $lang->story->reviewTip['active'] = 'The Story is already active,no review requirements.'; $lang->story->reviewTip['notReviewer'] = 'You are not the reviewer of this Story and cannot perform review operations.'; $lang->story->reviewTip['reviewed'] = 'Reviewed'; -$lang->story->reviewTip['recalled'] = 'This Story has been withdrawn from review and cannot be reviewed.'; $lang->story->recallTip = array(); -$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.'; -$lang->story->recallTip['recalled'] = 'This Story has been withdrawn from review and cannot be cancelled.'; -$lang->story->recallTip['reviewed'] = 'The review process has been started and cannot be cancelled.'; -$lang->story->recallTip['notOpenedBy'] = 'You are not the Story creator and cannot cancel the operation.'; +$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.'; $lang->story->subDivideTip = array(); $lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.'; -$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.'; -$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.'; +$lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be subdivided.'; $lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.'; $lang->story->featureBar['browse']['all'] = $lang->all; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index b694c39596..97a74567f6 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -443,24 +443,19 @@ $lang->story->categoryList['experience'] = '体验'; $lang->story->categoryList['improve'] = '改进'; $lang->story->categoryList['other'] = '其他'; -$lang->story->changeTip = '该需求正在评审中,无法进行变更'; +$lang->story->changeTip = '只有激活状态的需求,才能进行变更'; $lang->story->reviewTip = array(); $lang->story->reviewTip['active'] = '该需求已是激活状态,无需评审'; $lang->story->reviewTip['notReviewer'] = '您不是该需求的评审人员,无法进行评审操作'; $lang->story->reviewTip['reviewed'] = '您已评审'; -$lang->story->reviewTip['recalled'] = '该需求已撤销评审,无法进行评审操作'; $lang->story->recallTip = array(); -$lang->story->recallTip['actived'] = '该需求未发起评审流程,无需撤销操作'; -$lang->story->recallTip['recalled'] = '该需求已经撤销评审,无法进行撤销操作'; -$lang->story->recallTip['reviewed'] = '已进入评审流程,无法进行撤销操作'; -$lang->story->recallTip['notOpenedBy'] = '您不是需求创建者,无法进行撤销操作'; +$lang->story->recallTip['actived'] = '该需求未发起评审流程,无需撤销操作'; $lang->story->subDivideTip = array(); $lang->story->subDivideTip['subStory'] = '子需求无法细分'; -$lang->story->subDivideTip['planned'] = '该需求已计划,无法进行细分操作'; -$lang->story->subDivideTip['projected'] = '该需求已立项,无法进行细分操作'; +$lang->story->subDivideTip['notWait'] = '该需求%s,无法进行细分操作'; $lang->story->subDivideTip['notActive'] = '需求不是激活状态,无法进行细分操作'; $lang->story->featureBar['browse']['all'] = $lang->all; diff --git a/module/story/model.php b/module/story/model.php index 57159dbed8..c62e5af575 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -786,7 +786,7 @@ class storyModel extends model if(strpos('draft,changing', $oldStory->status) !== false and $this->checkForceReview() and empty($_POST['reviewer'])) { - dao::$errors[] = $this->lang->story->errorEmptyReviewedBy; + dao::$errors[] = $this->lang->story->notice->reviewerNotEmpty; return false; } @@ -4210,7 +4210,7 @@ class storyModel extends model if($story->URChanged) return $this->buildMenu('story', 'processStoryChange', $params, $story, $type, 'ok', '', 'iframe', true, '', $this->lang->confirm); $isClick = $this->isClickable($story, 'change'); - $title = (!$isClick and $story->status != 'closed' and $story->status != 'draft') ? $this->lang->story->changeTip : ''; + $title = $isClick ? '' : $this->lang->story->changeTip; $menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from&storyType=$story->type", $story, $type, 'alter', '', 'showinonlybody', false, '', $title); if(strpos('draft,changing', $story->status) !== false) @@ -4235,30 +4235,19 @@ class storyModel extends model { $title = $this->lang->story->reviewTip['notReviewer']; } - elseif(empty($storyReviewer)) - { - $title = $this->lang->story->reviewTip['recalled']; - } } $menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from&storyType=$story->type", $story, $type, 'search', '', 'showinonlybody', false, '', $title); } $isClick = $this->isClickable($story, 'recall'); $title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall; - if(!$isClick and $story->status != 'closed') - { - if($story->status == 'draft' and empty($storyReviewer)) $title = $this->lang->story->recallTip['recalled']; - if($story->status == 'draft' and !empty($storyReviewer)) $title = $this->lang->story->recallTip['reviewed']; - if(empty($story->reviewedBy) and strpos('draft,changing', $story->status) !== false and !empty($story->reviewer) and $this->app->user->account != $story->openedBy) $title = $this->lang->story->recallTip['notOpenedBy']; - if($story->status == 'active' and empty($story->reviewer)) $title = $this->lang->story->recallTip['actived']; - } - - $menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title); + $title = $isClick ? $title : $this->lang->story->recallTip['actived']; + $menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title); $menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true); $menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody'); - $tab = $this->app->tab == 'project' ? 'project' : 'qa'; + $tab = $this->app->tab == 'project' ? 'project' : 'qa'; if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='$tab'"); if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite') @@ -4274,8 +4263,7 @@ class storyModel extends model else { if($story->status != 'active') $title = $this->lang->story->subDivideTip['notActive']; - if(!empty($story->plan)) $title = $this->lang->story->subDivideTip['planned']; - if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected']; + if($story->status == 'active' and $story->stage != 'wait') $title = sprintf($this->lang->story->subDivideTip['notWait'], zget($this->lang->story->stageList, $story->stage)); } } $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID=0&plan=0&storyType=story", $story, $type, 'split', '', 'showinonlybody', '', '', $title); @@ -4320,20 +4308,20 @@ class storyModel extends model if(common::hasPriv('testcase', 'create', $story)) { - $link = helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=0&from=¶m=0&$params", '', true); + $link = helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=0&from=¶m=0&$params", '', true); $menu .= "
  • " . html::a($link, $this->lang->testcase->create, '', $misc) . "
  • "; } if(common::hasPriv('testcase', 'batchCreate')) { - $link = helper::createLink('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=0&$params", '', true); + $link = helper::createLink('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=0&$params", '', true); $menu .= "
  • " . html::a($link, $this->lang->testcase->batchCreate, '', $misc) . "
  • "; } $menu .= ""; } - if($this->app->tab == 'execution' and strpos('draft,closed', $story->status) === false) $menu .= $this->buildMenu('task', 'create', "execution={$this->session->execution}&{$params}&moduleID=$story->module", $story, $type, 'plus', '', 'showinonly body'); + if($this->app->tab == 'execution' and $story->status == 'active') $menu .= $this->buildMenu('task', 'create', "execution={$this->session->execution}&{$params}&moduleID=$story->module", $story, $type, 'plus', '', 'showinonlybody'); $menu .= "
    "; $menu .= $this->buildFlowMenu('story', $story, $type, 'direct'); @@ -4378,7 +4366,7 @@ class storyModel extends model } $this->lang->task->create = $this->lang->execution->wbs; - $toTaskDisabled = strpos('draft,closed', $story->status) !== false ? 'disabled' : ''; + $toTaskDisabled = $story->status == 'active' ? '' : 'disabled'; if(commonModel::isTutorialMode()) { $wizardParams = helper::safe64Encode($param);