* [bug#58488,doing,1.5h] add confirm story change button.
This commit is contained in:
@@ -1971,6 +1971,14 @@ class executionModel extends model
|
||||
$delay = count($actualDays) - 1;
|
||||
if($delay > 0) $task->delay = $delay;
|
||||
}
|
||||
|
||||
/* Story changed or not. */
|
||||
$task->needConfirm = false;
|
||||
if(!empty($task->storyStatus) && $task->storyStatus == 'active' && $task->latestStoryVersion > $task->storyVersion)
|
||||
{
|
||||
$task->needConfirm = true;
|
||||
$task->status = 'changed';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4772,17 +4780,27 @@ class executionModel extends model
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
foreach($this->config->project->execution->dtable->actionsRule['task'] as $action)
|
||||
if(!$canModify) continue;
|
||||
if($task->status == 'changed')
|
||||
{
|
||||
$rawAction = str_replace('Task', '', $action);
|
||||
if(!$canModify) continue;
|
||||
if(!commonModel::hasPriv('task', $rawAction)) continue;
|
||||
if(!common::hasDBPriv($task, 'task', $rawAction)) continue;
|
||||
if(!commonModel::hasPriv('task', 'confirmStoryChange')) continue;
|
||||
if(!common::hasDBPriv($task, 'task', 'confirmStoryChange')) continue;
|
||||
$clickable = $this->task->isClickable($task, 'confirmStoryChange');
|
||||
$task->actions[] = array('name' => 'confirmStoryChange', 'disabled' => !$clickable);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($this->config->project->execution->dtable->actionsRule['task'] as $action)
|
||||
{
|
||||
$rawAction = str_replace('Task', '', $action);
|
||||
if(!commonModel::hasPriv('task', $rawAction)) continue;
|
||||
if(!common::hasDBPriv($task, 'task', $rawAction)) continue;
|
||||
|
||||
$clickable = $this->task->isClickable($task, $rawAction);
|
||||
$action = array('name' => $action);
|
||||
if(!$clickable) $action['disabled'] = true;
|
||||
$task->actions[] = $action;
|
||||
$clickable = $this->task->isClickable($task, $rawAction);
|
||||
$action = array('name' => $action);
|
||||
if(!$clickable) $action['disabled'] = true;
|
||||
$task->actions[] = $action;
|
||||
}
|
||||
}
|
||||
|
||||
$prefixLabel = "<span class='pri-{$task->pri} mr-1'>{$task->pri}</span> ";
|
||||
|
||||
@@ -313,6 +313,11 @@ $config->project->execution->dtable->fieldList['actions']['actionsMap']['batchCr
|
||||
$config->project->execution->dtable->fieldList['actions']['actionsMap']['batchCreate']['hint'] = $lang->task->batchCreate;
|
||||
$config->project->execution->dtable->fieldList['actions']['actionsMap']['batchCreate']['url'] = helper::createLink('task', 'batchCreate', 'execution={execution}&storyID={story}&moduleID={module}&taskID={rawID}');
|
||||
|
||||
$config->project->execution->dtable->fieldList['actions']['actionsMap']['confirmStoryChange']['icon'] = 'search';
|
||||
$config->project->execution->dtable->fieldList['actions']['actionsMap']['confirmStoryChange']['hint'] = $lang->task->confirmStoryChange;
|
||||
$config->project->execution->dtable->fieldList['actions']['actionsMap']['confirmStoryChange']['url'] = helper::createLink('task', 'confirmStoryChange', 'taskID={rawID}');
|
||||
$config->project->execution->dtable->fieldList['actions']['actionsMap']['confirmStoryChange']['data-app'] = $app->tab;
|
||||
|
||||
$config->project->execution->dtable->actionsRule['scrum'] = array('start', 'createTask', 'edit', 'close|activate', 'delete');
|
||||
$config->project->execution->dtable->actionsRule['kanban'] = array('start', 'createTask', 'edit', 'close|activate', 'delete');
|
||||
$config->project->execution->dtable->actionsRule['agileplus'] = array('start', 'createTask', 'edit', 'close|activate', 'delete');
|
||||
|
||||
@@ -81,6 +81,7 @@ $fieldList['name']['name'] = 'nameCol';
|
||||
$fieldList['actions']['width'] = '160';
|
||||
|
||||
foreach(array_keys($fieldList['actions']['actionsMap']) as $actionKey) unset($fieldList['actions']['actionsMap'][$actionKey]['text']);
|
||||
$fieldList['status']['statusMap']['changed'] = $lang->task->storyChange;
|
||||
|
||||
$executions = $this->execution->generateRow($executionStats, $users, $avatarList);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user