diff --git a/module/task/js/create.js b/module/task/js/create.js index d63f2138e6..a0e2460ed1 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -62,6 +62,18 @@ function loadExecutionStories(executionID) $('#story').next('.picker').remove(); $('#story').replaceWith(data); $('#story').addClass('filled').chosen(); + + /* If there is no story option, select will be hidden and text will be displayed; otherwise, the opposite is true */ + if($('#story option').length > 1) + { + $('#story').parent().removeClass('hidden'); + $('#storyBox').addClass('hidden'); + } + else + { + $('#storyBox').removeClass('hidden'); + $('#story').parent().addClass('hidden'); + } if($('#testStoryBox table tbody tr').length == 0) { diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 6e3d083976..492f20a3d4 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -79,27 +79,25 @@ type != 'ops'):?> task->story;?> - - - task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?> - -
- story => $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?> + + task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?> +
+ story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?> preview;?>
- + - type != 'ops'):?> + type != 'ops'):?> task->selectTestStory;?> - - + +
task->storyAB;?>task->pri;?>task->storyAB;?>task->pri;?> task->datePlan;?> task->assignedTo;?> task->estimate;?>