Merge branch 'main' into feature/task
This commit is contained in:
@@ -115,6 +115,22 @@ $config->task->dtable->fieldList['progress']['show'] = true;
|
||||
$config->task->dtable->fieldList['progress']['sortType'] = false;
|
||||
$config->task->dtable->fieldList['progress']['group'] = 5;
|
||||
|
||||
if($config->edition != 'open')
|
||||
{
|
||||
$config->task->dtable->fieldList['relatedObject']['name'] = 'relatedObject';
|
||||
$config->task->dtable->fieldList['relatedObject']['title'] = $lang->custom->relateObject;
|
||||
$config->task->dtable->fieldList['relatedObject']['sortType'] = false;
|
||||
$config->task->dtable->fieldList['relatedObject']['width'] = '70';
|
||||
$config->task->dtable->fieldList['relatedObject']['type'] = 'text';
|
||||
$config->task->dtable->fieldList['relatedObject']['link'] = common::hasPriv('custom', 'showRelationGraph') ? "RAWJS<function(info){ if(info.row.data.relatedObject == 0) return 0; else return '" . helper::createLink('custom', 'showRelationGraph', 'objectID={id}&objectType=task') . "'; }>RAWJS" : null;
|
||||
$config->task->dtable->fieldList['relatedObject']['data-toggle'] = 'modal';
|
||||
$config->task->dtable->fieldList['relatedObject']['data-size'] = 'lg';
|
||||
$config->task->dtable->fieldList['relatedObject']['show'] = true;
|
||||
$config->task->dtable->fieldList['relatedObject']['group'] = 5;
|
||||
$config->task->dtable->fieldList['relatedObject']['flex'] = false;
|
||||
$config->task->dtable->fieldList['relatedObject']['align'] = 'center';
|
||||
}
|
||||
|
||||
$config->task->dtable->fieldList['closedBy']['type'] = 'user';
|
||||
$config->task->dtable->fieldList['closedBy']['sortType'] = true;
|
||||
$config->task->dtable->fieldList['closedBy']['group'] = 6;
|
||||
@@ -164,16 +180,18 @@ $config->task->dtable->fieldList['module']['control'] = 'select';
|
||||
$config->task->dtable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getTaskOptionMenu', 'params' => ['rootID' => '$executionID', 'startModule' => (int)0, 'extra' => 'allModule']);
|
||||
$config->task->dtable->fieldList['module']['display'] = false;
|
||||
|
||||
$config->task->dtable->fieldList['execution']['title'] = 'execution';
|
||||
$config->task->dtable->fieldList['execution']['name'] = 'execution';
|
||||
$config->task->dtable->fieldList['execution']['title'] = $lang->task->execution;
|
||||
$config->task->dtable->fieldList['execution']['control'] = 'hidden';
|
||||
$config->task->dtable->fieldList['execution']['type'] = 'html';
|
||||
$config->task->dtable->fieldList['execution']['dataSource'] = array('module' => 'execution', 'method' => 'getPairs', 'params' => ['projectID' => 0]);
|
||||
$config->task->dtable->fieldList['execution']['display'] = false;
|
||||
|
||||
$config->task->dtable->fieldList['project']['title'] = 'project';
|
||||
$config->task->dtable->fieldList['project']['name'] = 'project';
|
||||
$config->task->dtable->fieldList['project']['title'] = $lang->task->project;
|
||||
$config->task->dtable->fieldList['project']['control'] = 'hidden';
|
||||
$config->task->dtable->fieldList['project']['type'] = 'html';
|
||||
$config->task->dtable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairs');
|
||||
$config->task->dtable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairs', 'params' => ['ignoreVision' => false]);
|
||||
$config->task->dtable->fieldList['project']['display'] = false;
|
||||
|
||||
$config->task->dtable->fieldList['mode']['title'] = 'mode';
|
||||
|
||||
+15
-1
@@ -510,7 +510,21 @@ class taskModel extends model
|
||||
if(!$taskID) return false;
|
||||
|
||||
/* Update Kanban and story stage. */
|
||||
if(!empty($task->story)) $this->story->setStage($task->story);
|
||||
if(!empty($task->story))
|
||||
{
|
||||
$this->story->setStage($task->story);
|
||||
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$relation = new stdClass();
|
||||
$relation->relation = 'generated';
|
||||
$relation->AID = $task->story;
|
||||
$relation->AType = 'story';
|
||||
$relation->BID = $taskID;
|
||||
$relation->BType = 'task';
|
||||
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
|
||||
}
|
||||
}
|
||||
$this->updateKanbanForBatchCreate($taskID, $executionID, $laneID, (int)$columnID);
|
||||
|
||||
$taskIdList[$taskID] = $taskID;
|
||||
|
||||
@@ -95,7 +95,7 @@ if(!$task->fromBug && $task->story)
|
||||
'toolbar' => $task->needConfirm ? array
|
||||
(
|
||||
array('text' => $lang->task->storyChange, 'class' => 'ghost pointer-events-none'),
|
||||
array('text' => $lang->confirm, 'type' => 'primary', 'url' => createLink('task', 'confirmStoryChange', "taskID={$task->id}"))
|
||||
array('text' => $lang->confirm, 'type' => 'primary', 'class' => 'ajax-submit', 'url' => createLink('task', 'confirmStoryChange', "taskID={$task->id}"))
|
||||
) : null,
|
||||
'sections' => array
|
||||
(
|
||||
@@ -168,7 +168,7 @@ $tabs[] = setting()
|
||||
->group('related')
|
||||
->title($lang->task->legendEffort)
|
||||
->control('taskEffortInfo');
|
||||
$tabs[] = setting()
|
||||
$tabs['taskMiscInfo'] = setting()
|
||||
->group('related')
|
||||
->title($lang->task->legendMisc)
|
||||
->control('taskMiscInfo');
|
||||
|
||||
@@ -1431,6 +1431,24 @@ class taskZen extends task
|
||||
}
|
||||
}
|
||||
|
||||
/* Compute task progress. */
|
||||
if(!isset($task->progress))
|
||||
{
|
||||
if($task->consumed == 0 && $task->left == 0)
|
||||
{
|
||||
$task->progress = 0;
|
||||
}
|
||||
elseif($task->consumed != 0 && $task->left == 0)
|
||||
{
|
||||
$task->progress = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
$task->progress = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
|
||||
}
|
||||
$task->progress .= '%';
|
||||
}
|
||||
|
||||
if($this->config->edition == 'open' && $task->parent > 0 && strpos($task->name, htmlentities('>')) !== 0) $task->name = '>' . $task->name;
|
||||
if(!empty($task->team))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user