diff --git a/app/Http/Controllers/TaskKanbanController.php b/app/Http/Controllers/TaskKanbanController.php index cc088adeb5..b493c784d7 100644 --- a/app/Http/Controllers/TaskKanbanController.php +++ b/app/Http/Controllers/TaskKanbanController.php @@ -58,7 +58,6 @@ class TaskKanbanController extends BaseController // otherwise, check that the tasks orders are correct } else { $firstStatus = $statuses[0]; - $adjustment = 0; $counts = []; foreach ($tasks as $task) { if (! $task->task_status || $task->task_status->trashed()) { @@ -118,7 +117,7 @@ class TaskKanbanController extends BaseController $origSortOrder = $status->sort_order; $newSortOrder = request('sort_order'); - if ($newSortOrder != $origSortOrder) { + if (request()->has('sort_order') && $newSortOrder != $origSortOrder) { TaskStatus::scope() ->where('sort_order', '>', $origSortOrder) ->decrement('sort_order'); diff --git a/resources/views/tasks/kanban.blade.php b/resources/views/tasks/kanban.blade.php index 359402933c..040156fc71 100644 --- a/resources/views/tasks/kanban.blade.php +++ b/resources/views/tasks/kanban.blade.php @@ -793,9 +793,11 @@ +