diff --git a/module/bug/control.php b/module/bug/control.php index b32955383c..e92ca30bdc 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -313,6 +313,13 @@ class bug extends control $this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID"); } + /* If link from no head then reload*/ + if(isonlybody()) + { + $this->executeHooks($bugID); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); + } + $this->executeHooks($bugID); if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID)); diff --git a/module/story/control.php b/module/story/control.php index 4a61d99041..5249863cc0 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -120,6 +120,12 @@ class story extends control $this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID"); } + if(isonlybody()) + { + $this->executeHooks($storyID); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); + } + $this->executeHooks($storyID); if($this->post->newStory) diff --git a/module/task/control.php b/module/task/control.php index 08d6726e6b..708e64fab4 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -122,6 +122,12 @@ class task extends control $this->action->create('task', $taskID, 'Opened', ''); } + if($todoID > 0) + { + $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec(); + $this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID"); + } + /* If link from no head then reload*/ if(isonlybody()) { @@ -129,12 +135,6 @@ class task extends control $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); } - if($todoID > 0) - { - $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec(); - $this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID"); - } - $this->executeHooks($taskID); /* Locate the browser. */