summaryrefslogtreecommitdiff
path: root/app/Model/TaskCreationModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 09:42:01 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 09:42:01 -0500
commitde128dbad860478496a0d655b5eb5c1005ebbabe (patch)
tree7fee510e901273472731e8e843981268c593ec40 /app/Model/TaskCreationModel.php
parent0430a09c069134622c0161dc2fb9ba3718a73c0d (diff)
Remove default swimlane
Diffstat (limited to 'app/Model/TaskCreationModel.php')
-rw-r--r--app/Model/TaskCreationModel.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Model/TaskCreationModel.php b/app/Model/TaskCreationModel.php
index bd95c1a4..95f62ee5 100644
--- a/app/Model/TaskCreationModel.php
+++ b/app/Model/TaskCreationModel.php
@@ -62,7 +62,7 @@ class TaskCreationModel extends Base
$values = $this->dateParser->convert($values, array('date_started'), true);
$this->helper->model->removeFields($values, array('another_task', 'duplicate_multiple_projects'));
- $this->helper->model->resetFields($values, array('creator_id', 'owner_id', 'swimlane_id', 'date_due', 'date_started', 'score', 'category_id', 'time_estimated', 'time_spent'));
+ $this->helper->model->resetFields($values, array('creator_id', 'owner_id', 'date_due', 'date_started', 'score', 'category_id', 'time_estimated', 'time_spent'));
if (empty($values['column_id'])) {
$values['column_id'] = $this->columnModel->getFirstColumnId($values['project_id']);
@@ -80,7 +80,7 @@ class TaskCreationModel extends Base
$values['creator_id'] = $this->userSession->getId();
}
- $values['swimlane_id'] = empty($values['swimlane_id']) ? 0 : $values['swimlane_id'];
+ $values['swimlane_id'] = empty($values['swimlane_id']) ? $this->swimlaneModel->getFirstActiveSwimlaneId($values['project_id']) : $values['swimlane_id'];
$values['date_creation'] = time();
$values['date_modification'] = $values['date_creation'];
$values['date_moved'] = $values['date_creation'];