Skip to content

Commit 84ea8de

Browse files
committed
Implement check to skip non-user tasks in updateTaskStatus method
1 parent f5ae585 commit 84ea8de

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ProcessMaker/Repositories/CaseTaskRepository.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ public function updateCaseParticipatedTaskStatus()
4444
*/
4545
public function updateTaskStatus()
4646
{
47+
// Skip non-user tasks (e.g. script task, sub-process, etc.)
48+
// tasks column contains only user tasks
49+
$isUserTask = ($this->task->element_type ?? null) === 'task';
50+
if (!$isUserTask) {
51+
return;
52+
}
53+
4754
try {
4855
$case = $this->findCaseByTaskId($this->caseNumber, (string) $this->task->id);
4956

0 commit comments

Comments
 (0)