From 7832fc0c0b513f83e459fd5f26a9e9230b6ead6e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 19 Dec 2017 20:41:32 +0200 Subject: [PATCH] Working on task kanban --- app/Http/Controllers/TaskKanbanController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/TaskKanbanController.php b/app/Http/Controllers/TaskKanbanController.php index 7c483d66fd..f7a25f534e 100644 --- a/app/Http/Controllers/TaskKanbanController.php +++ b/app/Http/Controllers/TaskKanbanController.php @@ -69,10 +69,10 @@ class TaskKanbanController extends BaseController { $status = TaskStatus::scope($publicId)->firstOrFail(); - if ($status->sort_order != request('sort_order')) { - $origSortOrder = $status->sort_order; - $newSortOrder = request('sort_order'); + $origSortOrder = $status->sort_order; + $newSortOrder = request('sort_order'); + if ($newSortOrder && $newSortOrder != $origSortOrder) { TaskStatus::scope() ->where('sort_order', '>', $origSortOrder) ->decrement('sort_order');