summaryrefslogtreecommitdiff
path: root/app/Model/TaskPosition.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/TaskPosition.php')
-rw-r--r--app/Model/TaskPosition.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/Model/TaskPosition.php b/app/Model/TaskPosition.php
index 8589cac5..37c1ace0 100644
--- a/app/Model/TaskPosition.php
+++ b/app/Model/TaskPosition.php
@@ -40,10 +40,15 @@ class TaskPosition extends Base
$this->fireEvents($original_task, $column_id, $position, $swimlane_id);
}
- if ($original_task['column_id'] != $column_id
- && $column_id == $this->board->getLastColumnPosition($project_id)
- && $original_task['recurrence_status'] == Task::RECURE_STATUS_PENDING
- && $original_task['recurrence_trigger'] == Task::RECURE_TRIGGER_MOVE)
+ if ($original_task['recurrence_status'] == Task::RECURE_STATUS_PENDING
+ && $original_task['column_id'] != $column_id
+ && (
+ ($original_task['column_id'] == $this->board->getFirstColumn($project_id)
+ && $original_task['recurrence_trigger'] == Task::RECURE_TRIGGER_FIRST)
+ || ($column_id == $this->board->getLastColumn($project_id)
+ && $original_task['recurrence_trigger'] == Task::RECURE_TRIGGER_LAST)
+ )
+ )
{
$this->taskDuplication->createRecurrence($task_id);
}