summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-07 20:54:56 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-07 20:54:56 -0500
commitd3650eaa2582f6224eb5f5549829b7a84cda1ea4 (patch)
tree5edda18f9a2ba85b3388bfa285b2db4c282addf3
parentef0da7a97f2a901ab41a89670a857686698cc095 (diff)
Fix broken subtask restriction per user
-rw-r--r--ChangeLog1
-rw-r--r--app/Controller/SubtaskRestrictionController.php10
-rw-r--r--app/Helper/SubtaskHelper.php2
3 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 701aebb5..aef3007c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@ Improvements:
Bug fixes:
* Search with multiple expressions with double quotes was not working
+* Fix broken subtask restriction per user
Version 1.0.38 (Jan 28, 2017)
-----------------------------
diff --git a/app/Controller/SubtaskRestrictionController.php b/app/Controller/SubtaskRestrictionController.php
index cb642e1c..0e207674 100644
--- a/app/Controller/SubtaskRestrictionController.php
+++ b/app/Controller/SubtaskRestrictionController.php
@@ -46,14 +46,16 @@ class SubtaskRestrictionController extends BaseController
// Change status of the previous "in progress" subtask
$this->subtaskModel->update(array(
- 'id' => $values['id'],
- 'status' => $values['status'],
+ 'id' => $values['id'],
+ 'status' => $values['status'],
+ 'task_id' => $task['id'],
));
// Set the current subtask to "in progress"
$this->subtaskModel->update(array(
- 'id' => $subtask['id'],
- 'status' => SubtaskModel::STATUS_INPROGRESS,
+ 'id' => $subtask['id'],
+ 'status' => SubtaskModel::STATUS_INPROGRESS,
+ 'task_id' => $task['id'],
));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
diff --git a/app/Helper/SubtaskHelper.php b/app/Helper/SubtaskHelper.php
index 8e090f17..1b8b0e51 100644
--- a/app/Helper/SubtaskHelper.php
+++ b/app/Helper/SubtaskHelper.php
@@ -43,7 +43,7 @@ class SubtaskHelper extends Base
$params = array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'refresh-table' => (int) $refresh_table);
if ($subtask['status'] == 0 && isset($this->sessionStorage->hasSubtaskInProgress) && $this->sessionStorage->hasSubtaskInProgress) {
- return $this->helper->url->link($this->getTitle($subtask), 'SubtaskRestrictionController', 'show', $params, false, 'popover');
+ return $this->helper->url->link($this->getTitle($subtask), 'SubtaskRestrictionController', 'show', $params, false, 'js-modal-confirm');
}
$class = 'subtask-toggle-status '.($refresh_table ? 'subtask-refresh-table' : '');