From 3bdeeea0f0865d7db7447be4a9c0d02ecf13674e Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 7 Jul 2022 01:12:48 +0000 Subject: [PATCH] * Fix bug #24908. --- module/bug/control.php | 6 ++++++ module/story/control.php | 6 ++++++ module/task/control.php | 2 ++ 3 files changed, 14 insertions(+) diff --git a/module/bug/control.php b/module/bug/control.php index b0c319c502..49b58b80a7 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -395,6 +395,12 @@ class bug extends control { $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($output['todoID'])->exec(); $this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID"); + + if($this->config->edition == 'biz' || $this->config->edition == 'max') + { + $todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($output['todoID'])->fetch(); + if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done'); + } } $message = $this->executeHooks($bugID); diff --git a/module/story/control.php b/module/story/control.php index 6b3a43444e..5f7abe387f 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -175,6 +175,12 @@ class story extends control { $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec(); $this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID"); + + if($this->config->edition == 'biz' || $this->config->edition == 'max') + { + $todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($todoID)->fetch(); + if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done'); + } } $message = $this->executeHooks($storyID); diff --git a/module/task/control.php b/module/task/control.php index 104163f453..f9b4f79327 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -168,6 +168,8 @@ class task extends control { $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec(); $this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID"); + + if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done'); } $message = $this->executeHooks($taskID);