Set the correct swimlane/column ID when moving a task via its internal dialog.
Fixes https://github.com/kanboard/kanboard/issues/3114.
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
<?= $this->app->component('task-move-position', array(
|
<?= $this->app->component('task-move-position', array(
|
||||||
'saveUrl' => $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
'saveUrl' => $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||||
'board' => $board,
|
'board' => $board,
|
||||||
|
'task' => $task,
|
||||||
'swimlaneLabel' => t('Swimlane'),
|
'swimlaneLabel' => t('Swimlane'),
|
||||||
'columnLabel' => t('Column'),
|
'columnLabel' => t('Column'),
|
||||||
'positionLabel' => t('Position'),
|
'positionLabel' => t('Position'),
|
||||||
|
|||||||
@@ -85,7 +85,11 @@ KB.component('task-move-position', function (containerElement, options) {
|
|||||||
var swimlanes = [];
|
var swimlanes = [];
|
||||||
|
|
||||||
options.board.forEach(function(swimlane) {
|
options.board.forEach(function(swimlane) {
|
||||||
swimlanes.push({'value': swimlane.id, 'text': swimlane.name});
|
var option = {'value': swimlane.id, 'text': swimlane.name};
|
||||||
|
if(swimlane.id == options.task.swimlane_id) {
|
||||||
|
option.selected = "";
|
||||||
|
}
|
||||||
|
swimlanes.push(option);
|
||||||
});
|
});
|
||||||
|
|
||||||
return KB.dom('select')
|
return KB.dom('select')
|
||||||
@@ -102,7 +106,11 @@ KB.component('task-move-position', function (containerElement, options) {
|
|||||||
options.board.forEach(function(swimlane) {
|
options.board.forEach(function(swimlane) {
|
||||||
if (swimlaneId === swimlane.id) {
|
if (swimlaneId === swimlane.id) {
|
||||||
swimlane.columns.forEach(function(column) {
|
swimlane.columns.forEach(function(column) {
|
||||||
columns.push({'value': column.id, 'text': column.title});
|
var option = {'value': column.id, 'text': column.title};
|
||||||
|
if(column.id == options.task.column_id) {
|
||||||
|
option.selected = "";
|
||||||
|
}
|
||||||
|
columns.push(option);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user