summaryrefslogtreecommitdiff
path: root/app/Model/TaskDuplicationModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-04-30 14:39:51 -0400
committerFrederic Guillot <fred@kanboard.net>2017-04-30 14:39:51 -0400
commitf22cc29cd52d71580f598d0602cdce85bfaf5e92 (patch)
tree3120edd44702149e1a16e47d24ce42bdd3b8b2de /app/Model/TaskDuplicationModel.php
parent11d1da2d7915fef02e60fff787b1ea640f780cda (diff)
Add [DUPLICATE] prefix to duplicated tasks title
Diffstat (limited to 'app/Model/TaskDuplicationModel.php')
-rw-r--r--app/Model/TaskDuplicationModel.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Model/TaskDuplicationModel.php b/app/Model/TaskDuplicationModel.php
index c07ebca0..eb59f555 100644
--- a/app/Model/TaskDuplicationModel.php
+++ b/app/Model/TaskDuplicationModel.php
@@ -47,7 +47,10 @@ class TaskDuplicationModel extends Base
*/
public function duplicate($task_id)
{
- $new_task_id = $this->save($task_id, $this->copyFields($task_id));
+ $values = $this->copyFields($task_id);
+ $values['title'] = t('[DUPLICATE]').' '.$values['title'];
+
+ $new_task_id = $this->save($task_id, $values);
if ($new_task_id !== false) {
$this->tagDuplicationModel->duplicateTaskTags($task_id, $new_task_id);