Reordering of subtask is not saved
This commit is contained in:
@@ -209,12 +209,11 @@ class SubtaskController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function movePosition()
|
public function movePosition()
|
||||||
{
|
{
|
||||||
$project_id = $this->request->getIntegerParam('project_id');
|
$task = $this->getTask();
|
||||||
$task_id = $this->request->getIntegerParam('task_id');
|
|
||||||
$values = $this->request->getJson();
|
$values = $this->request->getJson();
|
||||||
|
|
||||||
if (! empty($values) && $this->helper->user->hasProjectAccess('SubtaskController', 'movePosition', $project_id)) {
|
if (! empty($values) && $this->helper->user->hasProjectAccess('SubtaskController', 'movePosition', $task['project_id'])) {
|
||||||
$result = $this->subtaskPositionModel->changePosition($task_id, $values['subtask_id'], $values['position']);
|
$result = $this->subtaskPositionModel->changePosition($task['id'], $values['subtask_id'], $values['position']);
|
||||||
$this->response->json(array('result' => $result));
|
$this->response->json(array('result' => $result));
|
||||||
} else {
|
} else {
|
||||||
throw new AccessForbiddenException();
|
throw new AccessForbiddenException();
|
||||||
|
|||||||
Reference in New Issue
Block a user