diff options
Diffstat (limited to 'app/Model/TaskDuplicationModel.php')
-rw-r--r-- | app/Model/TaskDuplicationModel.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/Model/TaskDuplicationModel.php b/app/Model/TaskDuplicationModel.php index c9079653..c07ebca0 100644 --- a/app/Model/TaskDuplicationModel.php +++ b/app/Model/TaskDuplicationModel.php @@ -79,11 +79,13 @@ class TaskDuplicationModel extends Base } // Check if the swimlane exists for the destination project - if ($values['swimlane_id'] > 0) { - $values['swimlane_id'] = $this->swimlaneModel->getIdByName( - $values['project_id'], - $this->swimlaneModel->getNameById($values['swimlane_id']) - ); + $values['swimlane_id'] = $this->swimlaneModel->getIdByName( + $values['project_id'], + $this->swimlaneModel->getNameById($values['swimlane_id']) + ); + + if ($values['swimlane_id'] == 0) { + $values['swimlane_id'] = $this->swimlaneModel->getFirstActiveSwimlaneId($values['project_id']); } // Check if the column exists for the destination project |