* [bug#60524,doing,0.3h] adjust record action order.

This commit is contained in:
tianshujie
2025-03-13 09:39:12 +08:00
committed by 曹延义
parent ee644e5850
commit c5269fc87b
6 changed files with 21 additions and 25 deletions
+9 -3
View File
@@ -21,9 +21,9 @@ class taskModel extends model
* @param object $teamData
* @param string $drag
* @access public
* @return array|false
* @return bool
*/
public function activate(object $task, string $comment, object $teamData, array $drag = array()): array|false
public function activate(object $task, string $comment, object $teamData, array $drag = array()): bool
{
$taskID = $task->id;
@@ -63,11 +63,17 @@ class taskModel extends model
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
$changes = common::createChanges($oldTask, $task);
if($this->post->comment != '' || !empty($changes))
{
$actionID = $this->loadModel('action')->create('task', $taskID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status, $taskID);
$this->updateKanbanCell($taskID, $drag, $oldTask->execution);
return common::createChanges($oldTask, $task);
return !dao::isError();
}
/**