Add [DUPLICATE] prefix to duplicated tasks title

This commit is contained in:
Frederic Guillot
2017-04-30 14:39:51 -04:00
parent 11d1da2d79
commit f22cc29cd5
29 changed files with 37 additions and 3 deletions

View File

@@ -1,6 +1,11 @@
Version 1.0.43 (unreleased) Version 1.0.43 (unreleased)
--------------------------- ---------------------------
Improvements:
* Add "[DUPLICATE]" prefix to duplicated tasks title
* Add sorting by position and start date in task list view
Bug fixes: Bug fixes:
* Add missing plugin parameter for search box (Gantt and calendar plugin) * Add missing plugin parameter for search box (Gantt and calendar plugin)

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
'%d subtasks' => '%d Teilaufgaben', '%d subtasks' => '%d Teilaufgaben',
'%d subtask' => '%d Teilaufgabe', '%d subtask' => '%d Teilaufgabe',
'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Das Bewegen einer Aufgabe zwischen diesen Spalten ist nur für Aufgaben zulässig, die dem aktuellen Benutzer zugewiesen sind', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Das Bewegen einer Aufgabe zwischen diesen Spalten ist nur für Aufgaben zulässig, die dem aktuellen Benutzer zugewiesen sind',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
'%d subtasks' => '%d sous-tâches', '%d subtasks' => '%d sous-tâches',
'%d subtask' => '%d sous-tâche', '%d subtask' => '%d sous-tâche',
'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Seulement le déplacement des tâches entre ces colonnes est autorisé pour l\'utilisateur courant', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Seulement le déplacement des tâches entre ces colonnes est autorisé pour l\'utilisateur courant',
'[DUPLICATE]' => '[COPIE]',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1245,7 +1245,7 @@ return array(
'Click here to join your team' => 'Válassza ezt, ha csatlakozni akar a csapatjához', 'Click here to join your team' => 'Válassza ezt, ha csatlakozni akar a csapatjához',
'Invite people' => 'Emberek meghívása', 'Invite people' => 'Emberek meghívása',
'Emails' => 'E-mailek', 'Emails' => 'E-mailek',
'Enter one email address by line.' => 'Soronként egy e-mailt adjon meg', 'Enter one email address by line.' => 'Soronként egy e-mailt adjon meg',
'Add these people to this project' => 'Ezen személyek projekthez adása', 'Add these people to this project' => 'Ezen személyek projekthez adása',
'Add this person to this project' => 'Ezen személy projekthez adása', 'Add this person to this project' => 'Ezen személy projekthez adása',
'Sign-up' => 'Feliratkozás', 'Sign-up' => 'Feliratkozás',
@@ -1331,4 +1331,5 @@ return array(
'%d subtasks' => '%d alfeladat', '%d subtasks' => '%d alfeladat',
'%d subtask' => '%d alfeladat', '%d subtask' => '%d alfeladat',
'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Az aktuális felhasználóhoz rendelt feladatok csak az engedélyezett oszlopok között mozgathatóak', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Az aktuális felhasználóhoz rendelt feladatok csak az engedélyezett oszlopok között mozgathatóak',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
'%d subtasks' => '%d subtarefas', '%d subtasks' => '%d subtarefas',
'%d subtask' => '%d subtarefa', '%d subtask' => '%d subtarefa',
'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Apenas é permitido mover a tarefa entre essas colunas para tarefas atribuídas ao utilizador atual', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Apenas é permitido mover a tarefa entre essas colunas para tarefas atribuídas ao utilizador atual',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
'%d subtasks' => '%d подзадач', '%d subtasks' => '%d подзадач',
'%d subtask' => '%d подзадача', '%d subtask' => '%d подзадача',
'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Текущий пользователь может перемещать назначенные ему задачи только между этими колонками', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Текущий пользователь может перемещать назначенные ему задачи только между этими колонками',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -1331,4 +1331,5 @@ return array(
// '%d subtasks' => '', // '%d subtasks' => '',
// '%d subtask' => '', // '%d subtask' => '',
// 'Only moving task between those columns is permitted for tasks assigned to the current user' => '', // 'Only moving task between those columns is permitted for tasks assigned to the current user' => '',
// '[DUPLICATE]' => '',
); );

View File

@@ -47,7 +47,10 @@ class TaskDuplicationModel extends Base
*/ */
public function duplicate($task_id) 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) { if ($new_task_id !== false) {
$this->tagDuplicationModel->duplicateTaskTags($task_id, $new_task_id); $this->tagDuplicationModel->duplicateTaskTags($task_id, $new_task_id);

View File

@@ -93,7 +93,7 @@ class TaskDuplicationModelTest extends Base
$this->assertEquals(1, $task['swimlane_id']); $this->assertEquals(1, $task['swimlane_id']);
$this->assertEquals(3, $task['column_id']); $this->assertEquals(3, $task['column_id']);
$this->assertEquals(2, $task['position']); $this->assertEquals(2, $task['position']);
$this->assertEquals('test', $task['title']); $this->assertEquals('[DUPLICATE] test', $task['title']);
$this->assertEquals(0, $task['time_spent']); $this->assertEquals(0, $task['time_spent']);
} }