diff --git a/module/execution/css/task.css b/module/execution/css/task.css index 42eda4f7e7..20d6b20df0 100644 --- a/module/execution/css/task.css +++ b/module/execution/css/task.css @@ -11,3 +11,4 @@ td.delayed {background: #e84e0f !important; color: white;} #taskList .c-progress{padding-right: 8px; text-align: right;} #datatable-taskList .c-progress{padding-right: 8px; text-align: right;} .c-finishedBy, .c-lastEditedBy {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} +#executionTaskForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} diff --git a/module/task/model.php b/module/task/model.php index af049a7b81..a0108027e3 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -4140,10 +4140,24 @@ class taskModel extends model $storyChanged = !empty($task->storyStatus) && $task->storyStatus == 'active' && $task->latestStoryVersion > $task->storyVersion && !in_array($task->status, array('cancel', 'closed')); if($storyChanged) return $this->buildMenu('task', 'confirmStoryChange', $params, $task, 'browse', '', 'hiddenwin'); + $canStart = ($task->status != 'pause' and common::hasPriv('task', 'start')); + $canRestart = ($task->status == 'pause' and common::hasPriv('task', 'restart')); + $canFinish = common::hasPriv('task', 'finish'); + $canClose = common::hasPriv('task', 'close'); + $canRecordEstimate = common::hasPriv('task', 'recordEstimate'); + $canEdit = common::hasPriv('task', 'edit'); + $canBatchCreate = ($this->config->vision == 'rnd' and common::hasPriv('task', 'batchCreate')); + if($task->status != 'pause') $menu .= $this->buildMenu('task', 'start', $params, $task, 'browse', '', '', 'iframe', true); if($task->status == 'pause') $menu .= $this->buildMenu('task', 'restart', $params, $task, 'browse', '', '', 'iframe', true); - $menu .= $this->buildMenu('task', 'close', $params, $task, 'browse', '', '', 'iframe', true); $menu .= $this->buildMenu('task', 'finish', $params, $task, 'browse', '', '', 'iframe', true); + $menu .= $this->buildMenu('task', 'close', $params, $task, 'browse', '', '', 'iframe', true); + + if(($canStart or $canRestart or $canFinish or $canClose) and ($canRecordEstimate or $canEdit or $canBatchCreate)) + { + $menu .= "
"; + } + $menu .= $this->buildMenu('task', 'recordEstimate', $params, $task, 'browse', 'time', '', 'iframe', true); $menu .= $this->buildMenu('task', 'edit', $params, $task, 'browse'); if($this->config->vision == 'rnd')