diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-26 17:43:13 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-26 17:43:13 -0500 |
commit | cf821e117ce8b937cff7f386a107aaa81ba6bf9b (patch) | |
tree | 6075f4d1c5192f45e8b13479bc67f973b046fdf2 /app/Model/TaskDuplication.php | |
parent | 2b27d986b374923a266c132ac0a67fb515d30d1c (diff) |
Add swimlanes
Diffstat (limited to 'app/Model/TaskDuplication.php')
-rw-r--r-- | app/Model/TaskDuplication.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/Model/TaskDuplication.php b/app/Model/TaskDuplication.php index ab7a57f1..2410213b 100644 --- a/app/Model/TaskDuplication.php +++ b/app/Model/TaskDuplication.php @@ -27,6 +27,7 @@ class TaskDuplication extends Base 'score', 'category_id', 'time_estimated', + 'swimlane_id', ); /** @@ -79,6 +80,7 @@ class TaskDuplication extends Base $values['position'] = $this->taskFinder->countByColumnId($project_id, $values['column_id']) + 1; $values['owner_id'] = $task['owner_id']; $values['category_id'] = $task['category_id']; + $values['swimlane_id'] = $task['swimlane_id']; $this->checkDestinationProjectValues($values); @@ -100,8 +102,18 @@ class TaskDuplication extends Base // Check if the category exists for the destination project if ($values['category_id'] > 0) { - $category_name = $this->category->getNameById($values['category_id']); - $values['category_id'] = $this->category->getIdByName($values['project_id'], $category_name); + $values['category_id'] = $this->category->getIdByName( + $values['project_id'], + $this->category->getNameById($values['category_id']) + ); + } + + // Check if the swimlane exists for the destination project + if ($values['swimlane_id'] > 0) { + $values['swimlane_id'] = $this->swimlane->getIdByName( + $values['project_id'], + $this->swimlane->getNameById($values['swimlane_id']) + ); } } |