Fix broken subtask restriction per user

This commit is contained in:
Frederic Guillot
2017-02-07 20:54:56 -05:00
parent ef0da7a97f
commit d3650eaa25
3 changed files with 8 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ Improvements:
Bug fixes: Bug fixes:
* Search with multiple expressions with double quotes was not working * Search with multiple expressions with double quotes was not working
* Fix broken subtask restriction per user
Version 1.0.38 (Jan 28, 2017) Version 1.0.38 (Jan 28, 2017)
----------------------------- -----------------------------

View File

@@ -46,14 +46,16 @@ class SubtaskRestrictionController extends BaseController
// Change status of the previous "in progress" subtask // Change status of the previous "in progress" subtask
$this->subtaskModel->update(array( $this->subtaskModel->update(array(
'id' => $values['id'], 'id' => $values['id'],
'status' => $values['status'], 'status' => $values['status'],
'task_id' => $task['id'],
)); ));
// Set the current subtask to "in progress" // Set the current subtask to "in progress"
$this->subtaskModel->update(array( $this->subtaskModel->update(array(
'id' => $subtask['id'], 'id' => $subtask['id'],
'status' => SubtaskModel::STATUS_INPROGRESS, '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); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);

View File

@@ -43,7 +43,7 @@ class SubtaskHelper extends Base
$params = array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'refresh-table' => (int) $refresh_table); $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) { 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' : ''); $class = 'subtask-toggle-status '.($refresh_table ? 'subtask-refresh-table' : '');