* Code for mulit task.

This commit is contained in:
sunguangming
2022-08-26 14:33:50 +08:00
parent f49d83f024
commit a27dc9a3f2
10 changed files with 38 additions and 92 deletions
+7 -8
View File
@@ -778,7 +778,7 @@ class task extends control
if(!empty($task->team) and $task->mode == 'multi')
{
return $this->editTeam($executionID, $task, $kanbanGroup, $from);
return $this->editTeam($executionID, $taskID, $kanbanGroup, $from);
}
if(!empty($_POST))
@@ -1343,9 +1343,9 @@ class task extends control
$task->nextBy = $this->task->getAssignedTo4Multi($members, $task);
$task->myConsumed = isset($task->team[$this->app->user->account]) ? $task->team[$this->app->user->account]->consumed : 0;
$lastAccount = end($teams);
$finishedUsers = $this->task->getFinishedUsers($taskID, $teams);
if(($lastAccount != $task->assignedTo and $task->mode == 'linear') or ($task->mode == 'multi' and count($teams) != count($finishedUsers)))
$lastAccount = end($task->members);
$finishedUsers = $this->task->getFinishedUsers($taskID, $task->members);
if(($lastAccount != $task->assignedTo and $task->mode == 'linear') or ($task->mode == 'multi' and count($task->members) != count($finishedUsers)))
{
$members = $this->task->getMemberPairs($task);
}
@@ -2314,15 +2314,15 @@ class task extends control
* Update assign of multi task.
*
* @param int $requestID
* @param object $task
* @param object $taskID
* @param string $kanbanGroup
* @param string $from
* @access public
* @return void
*/
public function editTeam($executionID, $task, $kanbanGroup = 'default', $from = '')
public function editTeam($executionID, $taskID, $kanbanGroup = 'default', $from = '')
{
$taskID = $task->id;
$task = $this->task->getById($taskID);
$this->commonAction($taskID);
if(!empty($_POST))
@@ -2344,7 +2344,6 @@ class task extends control
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'success'));
if(isonlybody())
{
$task = $this->task->getById($taskID);
$execution = $this->execution->getByID($task->execution);
if(($this->app->tab == 'execution' or ($this->config->vision == 'lite' and $this->app->tab == 'project' and $this->session->kanbanview == 'kanban')) and $execution->type == 'kanban')