diff --git a/module/execution/control.php b/module/execution/control.php index bdec90fbd6..b71cf5abfd 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -736,6 +736,9 @@ class execution extends control $stories = $this->story->getExecutionStories($executionID, 0, 0, $sort, $type, $param, 'story', '', $pager); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false); + + if(!empty($stories)) $stories = $this->story->mergeReviewer($stories); + $users = $this->user->getPairs('noletter'); /* Build the search form. */ diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 71362660f2..1a10276487 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -196,7 +196,7 @@ story->taskCountAB;?> story->bugCountAB;?> story->caseCountAB;?> - actions;?> + actions;?> @@ -256,6 +256,22 @@ { $param = "executionID={$execution->id}&story={$story->id}&moduleID={$story->module}"; + $story->reviewer = isset($story->reviewer) ? $story->reviewer : array(); + $story->notReview = isset($story->notReview) ? $story->notReview : array(); + + if(common::hasPriv('story', 'review')) + { + $reviewDisabled = in_array($app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changed') ? '' : 'disabled'; + $story->from = 'execution'; + common::printIcon('story', 'review', "story={$story->id}&from=story", $story, 'list', 'search', '', $reviewDisabled, false, "data-group=execution"); + } + + if(common::hasPriv('story', 'recall')) + { + $recallDisabled = empty($story->reviewedBy) and strpos('draft,changed', $story->status) !== false and !empty($story->reviewer) ? '' : 'disabled'; + common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'back', 'hiddenwin', $recallDisabled, '', '', $lang->story->recall); + } + $lang->task->create = $lang->execution->wbs; $toTaskDisabled = strpos('draft,closed', $story->status) !== false ? 'disabled' : ''; if(commonModel::isTutorialMode()) diff --git a/module/story/config.php b/module/story/config.php index 7fb95e824d..71fd167136 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -199,5 +199,5 @@ $config->story->datatable->fieldList['caseCount']['name'] = $lang->story->ca $config->story->datatable->fieldList['actions']['title'] = 'actions'; $config->story->datatable->fieldList['actions']['fixed'] = 'right'; -$config->story->datatable->fieldList['actions']['width'] = '200'; +$config->story->datatable->fieldList['actions']['width'] = $app->tab == 'project' ? '220' : '200'; $config->story->datatable->fieldList['actions']['required'] = 'yes'; diff --git a/module/story/model.php b/module/story/model.php index 0af26c0100..1b4e868659 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3769,7 +3769,7 @@ class storyModel extends model common::printIcon('story', 'change', $vars . "&from=$story->from", $story, 'list', 'alter', '', '', false, "data-group=$story->from"); common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'search', '', '', false, "data-group=$story->from"); - if($this->app->tab != 'project') common::printIcon('story', 'recall', $vars, $story, 'list', 'back', 'hiddenwin', '', '', '', $this->lang->story->recall); + common::printIcon('story', 'recall', $vars, $story, 'list', 'back', 'hiddenwin', '', '', '', $this->lang->story->recall); common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from"); if($story->type != 'requirement') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'");