diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Action/TaskAssignColorColumn.php | 1 | ||||
-rw-r--r-- | app/Action/TaskUpdateStartDate.php | 83 | ||||
-rw-r--r-- | app/Locale/da_DK/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/de_DE/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/es_ES/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/fi_FI/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/fr_FR/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/hu_HU/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/it_IT/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/ja_JP/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/nl_NL/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/pl_PL/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/pt_BR/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/ru_RU/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/sr_Latn_RS/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/sv_SE/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/th_TH/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/tr_TR/translations.php | 1 | ||||
-rw-r--r-- | app/Locale/zh_CN/translations.php | 1 | ||||
-rw-r--r-- | app/Model/Action.php | 1 |
20 files changed, 102 insertions, 0 deletions
diff --git a/app/Action/TaskAssignColorColumn.php b/app/Action/TaskAssignColorColumn.php index 2d10b776..ee1d66ae 100644 --- a/app/Action/TaskAssignColorColumn.php +++ b/app/Action/TaskAssignColorColumn.php @@ -8,6 +8,7 @@ use Model\Task; * Assign a color to a task * * @package action + * @author Frederic Guillot */ class TaskAssignColorColumn extends Base { diff --git a/app/Action/TaskUpdateStartDate.php b/app/Action/TaskUpdateStartDate.php new file mode 100644 index 00000000..4cd50c9a --- /dev/null +++ b/app/Action/TaskUpdateStartDate.php @@ -0,0 +1,83 @@ +<?php + +namespace Action; + +use Model\Task; + +/** + * Set the start date of task + * + * @package action + * @author Frederic Guillot + */ +class TaskUpdateStartDate extends Base +{ + /** + * Get the list of compatible events + * + * @access public + * @return array + */ + public function getCompatibleEvents() + { + return array( + Task::EVENT_MOVE_COLUMN, + ); + } + + /** + * Get the required parameter for the action (defined by the user) + * + * @access public + * @return array + */ + public function getActionRequiredParameters() + { + return array( + 'column_id' => t('Column'), + ); + } + + /** + * Get the required parameter for the event + * + * @access public + * @return string[] + */ + public function getEventRequiredParameters() + { + return array( + 'task_id', + 'column_id', + ); + } + + /** + * Execute the action (set the task color) + * + * @access public + * @param array $data Event data dictionary + * @return bool True if the action was executed or false when not executed + */ + public function doAction(array $data) + { + $values = array( + 'id' => $data['task_id'], + 'date_started' => time(), + ); + + return $this->taskModification->update($values); + } + + /** + * Check if the event data meet the action condition + * + * @access public + * @param array $data Event data dictionary + * @return bool + */ + public function hasRequiredCondition(array $data) + { + return $data['column_id'] == $this->getParam('column_id'); + } +} diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index 0815440f..2fba9478 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index c859d433..5f52a850 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 6f30046c..efe6150f 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index efd7eb6d..6bbba02e 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index e50bf1b3..6abca0ea 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -918,4 +918,5 @@ return array( 'Show tasks based on the start date' => 'Afficher les tâches en fonction de la date de début', 'Subtasks time tracking' => 'Suivi du temps par rapport aux sous-tâches', 'User calendar view' => 'Vue en mode utilisateur du calendrier', + 'Automatically update the start date' => 'Mettre à jour automatiquement la date de début', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 7f0280a8..d3a8628d 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 3f2f5f76..94bf4a5a 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 57ba3abb..18cf9d72 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index f3f2e72b..88c55155 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index cb24b60b..4a237f14 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 652dc80e..d8b7a7c6 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 354c6a5b..b0b2b09f 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index a43fe57b..20defd6d 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 8c7229f4..8c1ad094 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 3066e798..ecd9413c 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index e5011905..e18341e9 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index c6186145..0784cedb 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -916,4 +916,5 @@ return array( // 'Show tasks based on the start date' => '', // 'Subtasks time tracking' => '', // 'User calendar view' => '', + // 'Automatically update the start date' => '', ); diff --git a/app/Model/Action.php b/app/Model/Action.php index 4489bca7..3e8aa091 100644 --- a/app/Model/Action.php +++ b/app/Model/Action.php @@ -56,6 +56,7 @@ class Action extends Base 'TaskLogMoveAnotherColumn' => t('Add a comment logging moving the task between columns'), 'TaskAssignUser' => t('Change the assignee based on an external username'), 'TaskAssignCategoryLabel' => t('Change the category based on an external label'), + 'TaskUpdateStartDate' => t('Automatically update the start date'), ); asort($values); |