diff options
Diffstat (limited to 'app/Model/Task.php')
-rw-r--r-- | app/Model/Task.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/Model/Task.php b/app/Model/Task.php index 0753c57d..09c77573 100644 --- a/app/Model/Task.php +++ b/app/Model/Task.php @@ -387,6 +387,7 @@ class Task extends Base // Prepare data $this->prepare($values); $values['date_creation'] = time(); + $values['date_modification'] = $values['date_creation']; $values['position'] = $this->countByColumnId($values['project_id'], $values['column_id']); // Save task @@ -426,9 +427,13 @@ class Task extends Base // Prepare data $this->prepare($values); $updated_task = $values; - $updated_task['date_modification'] = time(); unset($updated_task['id']); + // We update the modification date only for the selected task to highlight recent moves + if ($trigger_events) { + $updated_task['date_modification'] = time(); + } + $result = $this->db->table(self::TABLE)->eq('id', $values['id'])->update($updated_task); // Trigger events |