From 30e9c221399c80696d6e317af1470868589dcd13 Mon Sep 17 00:00:00 2001 From: rafacamargo123 Date: Thu, 27 Dec 2018 17:44:49 -0200 Subject: Fix import of automatic actions when parameters are "unassigned" or "no category" --- app/Model/ActionParameterModel.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/Model/ActionParameterModel.php') diff --git a/app/Model/ActionParameterModel.php b/app/Model/ActionParameterModel.php index cdac396e..66c7adb4 100644 --- a/app/Model/ActionParameterModel.php +++ b/app/Model/ActionParameterModel.php @@ -147,6 +147,9 @@ class ActionParameterModel extends Base case 'project_id': return $value != $project_id ? $value : false; case 'category_id': + if ($value == 0) { + return 0; + } return $this->categoryModel->getIdByName($project_id, $this->categoryModel->getNameById($value)) ?: false; case 'src_column_id': case 'dest_column_id': @@ -156,6 +159,9 @@ class ActionParameterModel extends Base return empty($column) ? false : $this->columnModel->getColumnIdByTitle($project_id, $column['title']) ?: false; case 'user_id': case 'owner_id': + if ($value == 0) { + return 0; + } return $this->projectPermissionModel->isAssignable($project_id, $value) ? $value : false; case 'swimlane_id': $column = $this->swimlaneModel->getById($value); -- cgit v1.2.3