From 95cdeed472d00cd1b2f53b4878afd7fbc39ea389 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 14 Nov 2017 15:39:43 -0800 Subject: Task CSV import is now able to handle more fields Add support for the priority, start date, tags and one external link. --- app/Controller/TaskImportController.php | 15 +-- app/Core/Base.php | 1 - app/Import/TaskImport.php | 164 ++++++++++++++++++-------------- app/Locale/bs_BA/translations.php | 9 ++ app/Locale/ca_ES/translations.php | 9 ++ app/Locale/cs_CZ/translations.php | 9 ++ app/Locale/da_DK/translations.php | 9 ++ app/Locale/de_DE/translations.php | 9 ++ app/Locale/el_GR/translations.php | 9 ++ app/Locale/es_ES/translations.php | 9 ++ app/Locale/fi_FI/translations.php | 9 ++ app/Locale/fr_FR/translations.php | 9 ++ app/Locale/hr_HR/translations.php | 9 ++ app/Locale/hu_HU/translations.php | 9 ++ app/Locale/id_ID/translations.php | 9 ++ app/Locale/it_IT/translations.php | 9 ++ app/Locale/ja_JP/translations.php | 9 ++ app/Locale/ko_KR/translations.php | 9 ++ app/Locale/my_MY/translations.php | 9 ++ app/Locale/nb_NO/translations.php | 9 ++ app/Locale/nl_NL/translations.php | 9 ++ app/Locale/pl_PL/translations.php | 9 ++ app/Locale/pt_BR/translations.php | 9 ++ app/Locale/pt_PT/translations.php | 9 ++ app/Locale/ro_RO/translations.php | 9 ++ app/Locale/ru_RU/translations.php | 9 ++ app/Locale/sr_Latn_RS/translations.php | 9 ++ app/Locale/sv_SE/translations.php | 9 ++ app/Locale/th_TH/translations.php | 9 ++ app/Locale/tr_TR/translations.php | 9 ++ app/Locale/vi_VN/translations.php | 9 ++ app/Locale/zh_CN/translations.php | 9 ++ app/ServiceProvider/ClassProvider.php | 1 - app/Template/task_import/show.php | 2 + 34 files changed, 366 insertions(+), 78 deletions(-) (limited to 'app') diff --git a/app/Controller/TaskImportController.php b/app/Controller/TaskImportController.php index 2e323979..d6506880 100644 --- a/app/Controller/TaskImportController.php +++ b/app/Controller/TaskImportController.php @@ -3,6 +3,7 @@ namespace Kanboard\Controller; use Kanboard\Core\Csv; +use Kanboard\Import\TaskImport; /** * Task Import controller @@ -45,14 +46,15 @@ class TaskImportController extends BaseController if (! file_exists($filename)) { $this->show($values, array('file' => array(t('Unable to read your file')))); } else { - $this->taskImport->projectId = $project['id']; + $taskImport = new TaskImport($this->container); + $taskImport->setProjectId($project['id']); $csv = new Csv($values['delimiter'], $values['enclosure']); - $csv->setColumnMapping($this->taskImport->getColumnMapping()); - $csv->read($filename, array($this->taskImport, 'import')); + $csv->setColumnMapping($taskImport->getColumnMapping()); + $csv->read($filename, array($taskImport, 'importTask')); - if ($this->taskImport->counter > 0) { - $this->flash->success(t('%d task(s) have been imported successfully.', $this->taskImport->counter)); + if ($taskImport->getNumberOfImportedTasks() > 0) { + $this->flash->success(t('%d task(s) have been imported successfully.', $taskImport->getNumberOfImportedTasks())); } else { $this->flash->failure(t('Nothing have been imported!')); } @@ -67,7 +69,8 @@ class TaskImportController extends BaseController */ public function template() { + $taskImport = new TaskImport($this->container); $this->response->withFileDownload('tasks.csv'); - $this->response->csv(array($this->taskImport->getColumnMapping())); + $this->response->csv(array($taskImport->getColumnMapping())); } } diff --git a/app/Core/Base.php b/app/Core/Base.php index 3807f385..a36828c4 100644 --- a/app/Core/Base.php +++ b/app/Core/Base.php @@ -182,7 +182,6 @@ use Pimple\Container; * @property \Kanboard\Validator\TaskValidator $taskValidator * @property \Kanboard\Validator\UserValidator $userValidator * @property \Kanboard\Validator\PredefinedTaskDescriptionValidator $predefinedTaskDescriptionValidator - * @property \Kanboard\Import\TaskImport $taskImport * @property \Kanboard\Import\UserImport $userImport * @property \Kanboard\Export\SubtaskExport $subtaskExport * @property \Kanboard\Export\TaskExport $taskExport diff --git a/app/Import/TaskImport.php b/app/Import/TaskImport.php index cabf6b0c..26b8fc6a 100644 --- a/app/Import/TaskImport.php +++ b/app/Import/TaskImport.php @@ -4,90 +4,86 @@ namespace Kanboard\Import; use Kanboard\Core\Base; use Kanboard\Core\Csv; +use Kanboard\Core\ExternalLink\ExternalLinkManager; +use Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound; use SimpleValidator\Validator; use SimpleValidator\Validators; /** - * Task Import + * Task CSV Import * - * @package import + * @package Kanboard\Import * @author Frederic Guillot */ class TaskImport extends Base { - /** - * Number of successful import - * - * @access public - * @var integer - */ - public $counter = 0; - - /** - * Project id to import tasks - * - * @access public - * @var integer - */ - public $projectId; - - /** - * Get mapping between CSV header and SQL columns - * - * @access public - * @return array - */ + protected $nbImportedTasks = 0; + protected $projectId = 0; + + public function setProjectId($projectId) + { + $this->projectId = $projectId; + return $this; + } + + public function getNumberOfImportedTasks() + { + return $this->nbImportedTasks; + } + public function getColumnMapping() { return array( - 'reference' => 'Reference', - 'title' => 'Title', - 'description' => 'Description', - 'assignee' => 'Assignee Username', - 'creator' => 'Creator Username', - 'color' => 'Color Name', - 'column' => 'Column Name', - 'category' => 'Category Name', - 'swimlane' => 'Swimlane Name', - 'score' => 'Complexity', - 'time_estimated' => 'Time Estimated', - 'time_spent' => 'Time Spent', - 'date_due' => 'Due Date', - 'is_active' => 'Closed', + 'reference' => e('Reference'), + 'title' => e('Title'), + 'description' => e('Description'), + 'assignee' => e('Assignee Username'), + 'creator' => e('Creator Username'), + 'color' => e('Color Name'), + 'column' => e('Column Name'), + 'category' => e('Category Name'), + 'swimlane' => e('Swimlane Name'), + 'score' => e('Complexity'), + 'time_estimated' => e('Time Estimated'), + 'time_spent' => e('Time Spent'), + 'date_started' => e('Start Date'), + 'date_due' => e('Due Date'), + 'priority' => e('Priority'), + 'is_active' => e('Status'), + 'tags' => e('Tags'), + 'external_link' => e('External Link'), ); } - /** - * Import a single row - * - * @access public - * @param array $row - * @param integer $line_number - */ - public function import(array $row, $line_number) + public function importTask(array $row, $lineNumber) { - $row = $this->prepare($row); + $task = $this->prepareTask($row); + + if ($this->validateCreation($task)) { + $taskId = $this->taskCreationModel->create($task); + + if ($taskId > 0) { + $this->logger->debug(__METHOD__.': imported successfully line '.$lineNumber); + $this->nbImportedTasks++; - if ($this->validateCreation($row)) { - if ($this->taskCreationModel->create($row) > 0) { - $this->logger->debug('TaskImport: imported successfully line '.$line_number); - $this->counter++; + if (! empty($row['tags'])) { + $tagsList = explode(',', $row['tags']); + array_walk($tagsList, function (&$value) { $value = trim($value); }); + $this->taskTagModel->save($this->projectId, $taskId, $tagsList); + } + + if (! empty($row['external_link'])) { + $this->createExternalLink($taskId, $row['external_link']); + } } else { - $this->logger->error('TaskImport: creation error at line '.$line_number); + $this->logger->error(__METHOD__.': creation error at line '.$lineNumber); } } else { - $this->logger->error('TaskImport: validation error at line '.$line_number); + $this->logger->error(__METHOD__.': validation error at line '.$lineNumber); } } - /** - * Format row before validation - * - * @access public - * @param array $row - * @return array - */ - public function prepare(array $row) + public function prepareTask(array $row) { $values = array(); $values['project_id'] = $this->projectId; @@ -96,6 +92,7 @@ class TaskImport extends Base $values['description'] = $row['description']; $values['is_active'] = Csv::getBooleanValue($row['is_active']) == 1 ? 0 : 1; $values['score'] = (int) $row['score']; + $values['priority'] = (int) $row['priority']; $values['time_estimated'] = (float) $row['time_estimated']; $values['time_spent'] = (float) $row['time_spent']; @@ -127,22 +124,19 @@ class TaskImport extends Base $values['date_due'] = $this->dateParser->getTimestamp($row['date_due']); } + if (! empty($row['date_started'])) { + $values['date_started'] = $this->dateParser->getTimestamp($row['date_started']); + } + $this->helper->model->removeEmptyFields( $values, - array('owner_id', 'creator_id', 'color_id', 'column_id', 'category_id', 'swimlane_id', 'date_due') + array('owner_id', 'creator_id', 'color_id', 'column_id', 'category_id', 'swimlane_id', 'date_due', 'date_started', 'priority') ); return $values; } - /** - * Validate user creation - * - * @access public - * @param array $values - * @return boolean - */ - public function validateCreation(array $values) + protected function validateCreation(array $values) { $v = new Validator($values, array( new Validators\Integer('project_id', t('This value must be an integer')), @@ -154,4 +148,34 @@ class TaskImport extends Base return $v->execute(); } + + protected function createExternalLink($taskId, $externalLink) + { + try { + $provider = $this->externalLinkManager + ->setUserInputText($externalLink) + ->setUserInputType(ExternalLinkManager::TYPE_AUTO) + ->find(); + + $link = $provider->getLink(); + $dependencies = $provider->getDependencies(); + $values = array( + 'task_id' => $taskId, + 'title' => $link->getTitle(), + 'url' => $link->getUrl(), + 'link_type' => $provider->getType(), + 'dependency' => key($dependencies), + ); + + list($valid, $errors) = $this->externalLinkValidator->validateCreation($values); + + if ($valid) { + $this->taskExternalLinkModel->create($values); + } else { + $this->logger->error(__METHOD__.': '.var_export($errors, true)); + } + } catch (ExternalLinkProviderNotFound $e) { + $this->logger->error(__METHOD__.': '.$e->getMessage()); + } + } } diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index d34ee504..62aaea64 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php index f1cd7d4e..1240d560 100644 --- a/app/Locale/ca_ES/translations.php +++ b/app/Locale/ca_ES/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 6b60b424..dce15afe 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index dee65fe5..2149920d 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 483467ec..1499fcdc 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index 58af4681..c0e1e4e1 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index bff3eafa..0d01ee7a 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 12b35244..3c4915a6 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index e461004f..c86aa18e 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1357,4 +1357,13 @@ return array( 'Unable to remove this template.' => 'Impossible de supprimer ce modèle.', 'Template for the task description' => 'Modèle pour la description des tâches', 'The start date is greater than the end date' => 'La date de début est plus grande que la date d\'échéance', + 'Tags must be separated by a comma' => 'Les labels doivent être séparé par une virgule', + 'Only the task title is required' => 'Seulement le titre est obligatoire', + 'Creator Username' => 'Identifiant du créateur', + 'Color Name' => 'Nom de la couleur', + 'Column Name' => 'Nom de la colonne', + 'Swimlane Name' => 'Nom de la swimlane', + 'Time Estimated' => 'Durée estimée', + 'Time Spent' => 'Temps passé', + 'External Link' => 'Lien externe', ); diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php index 2a1c8f18..b57dc3b9 100644 --- a/app/Locale/hr_HR/translations.php +++ b/app/Locale/hr_HR/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 42463f89..eac0761e 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1357,4 +1357,13 @@ return array( 'Unable to remove this template.' => 'Nem lehet eltávolítani a sablont.', 'Template for the task description' => 'Sablon a feladatleíráshoz', 'The start date is greater than the end date' => 'A kezdési dátum nagyobb mint a befejezési dátum', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index e1d9491b..6f9f5d02 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index dd321ba7..b7e11f75 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 47812ee2..69162e2a 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1357,4 +1357,13 @@ return array( 'Unable to remove this template.' => 'テンプレートを削除できません', 'Template for the task description' => 'タスク説明のテンプレート', 'The start date is greater than the end date' => '開始日が終了日を超えています', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index 17f771e2..a4ae9319 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index 92b58360..eee1428c 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 50fedcc7..0ffc7ee1 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 3d9ba67c..12db3656 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 6873b233..78c0c2ea 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 0adf1d28..ebe4582a 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index 9faabf36..091e6c68 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/ro_RO/translations.php b/app/Locale/ro_RO/translations.php index 14ecf78f..9bdd19cd 100644 --- a/app/Locale/ro_RO/translations.php +++ b/app/Locale/ro_RO/translations.php @@ -1357,4 +1357,13 @@ return array( 'Unable to remove this template.' => 'Nu am putut șterge modelul.', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 49b93ebb..eb991f38 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 714e0338..6c288acb 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 1c807d04..97b4142d 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 0c21a0c2..fb2e0cbe 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 9dd3523b..c16d48f2 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/vi_VN/translations.php b/app/Locale/vi_VN/translations.php index b636d1d4..fad538a4 100644 --- a/app/Locale/vi_VN/translations.php +++ b/app/Locale/vi_VN/translations.php @@ -1363,4 +1363,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 8758b0de..46bffe6a 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1357,4 +1357,13 @@ return array( // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', + // 'Tags must be separated by a comma' => '', + // 'Only the task title is required' => '', + // 'Creator Username' => '', + // 'Color Name' => '', + // 'Column Name' => '', + // 'Swimlane Name' => '', + // 'Time Estimated' => '', + // 'Time Spent' => '', + // 'External Link' => '', ); diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php index aaafafdf..7f05dfae 100644 --- a/app/ServiceProvider/ClassProvider.php +++ b/app/ServiceProvider/ClassProvider.php @@ -122,7 +122,6 @@ class ClassProvider implements ServiceProviderInterface 'PredefinedTaskDescriptionValidator', ), 'Import' => array( - 'TaskImport', 'UserImport', ), 'Export' => array( diff --git a/app/Template/task_import/show.php b/app/Template/task_import/show.php index 20b020d3..342cfb76 100644 --- a/app/Template/task_import/show.php +++ b/app/Template/task_import/show.php @@ -26,6 +26,8 @@
  • +
  • +
  • url->icon('download', t('Download CSV template'), 'TaskImportController', 'template', array('project_id' => $project['id'])) ?> -- cgit v1.2.3