Reordering of subtask is not saved

This commit is contained in:
Tomas Dittmann 2022-03-18 01:25:46 +01:00 committed by GitHub
parent 28e61ad1c3
commit c4f9c34f75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -209,12 +209,11 @@ class SubtaskController extends BaseController
*/
public function movePosition()
{
$project_id = $this->request->getIntegerParam('project_id');
$task_id = $this->request->getIntegerParam('task_id');
$task = $this->getTask();
$values = $this->request->getJson();
if (! empty($values) && $this->helper->user->hasProjectAccess('SubtaskController', 'movePosition', $project_id)) {
$result = $this->subtaskPositionModel->changePosition($task_id, $values['subtask_id'], $values['position']);
if (! empty($values) && $this->helper->user->hasProjectAccess('SubtaskController', 'movePosition', $task['project_id'])) {
$result = $this->subtaskPositionModel->changePosition($task['id'], $values['subtask_id'], $values['position']);
$this->response->json(array('result' => $result));
} else {
throw new AccessForbiddenException();