Skip to content
Permalink
Browse files

Add the possibility to send tasks and comments to multiple recipients

  • Loading branch information...
fguillot committed Nov 17, 2017
1 parent 3b786e0 commit 2a313eb971ab36e166308f7882897ef204234d0a
Showing with 85 additions and 86 deletions.
  1. +1 −1 ChangeLog
  2. +12 −11 app/Controller/CommentMailController.php
  3. +12 −11 app/Controller/TaskMailController.php
  4. +1 −3 app/Import/TaskImport.php
  5. +1 −1 app/Locale/bs_BA/translations.php
  6. +1 −1 app/Locale/ca_ES/translations.php
  7. +1 −1 app/Locale/cs_CZ/translations.php
  8. +1 −1 app/Locale/da_DK/translations.php
  9. +1 −1 app/Locale/de_DE/translations.php
  10. +1 −1 app/Locale/el_GR/translations.php
  11. +1 −1 app/Locale/es_ES/translations.php
  12. +1 −1 app/Locale/fi_FI/translations.php
  13. +1 −1 app/Locale/fr_FR/translations.php
  14. +1 −1 app/Locale/hr_HR/translations.php
  15. +1 −1 app/Locale/hu_HU/translations.php
  16. +1 −1 app/Locale/id_ID/translations.php
  17. +1 −1 app/Locale/it_IT/translations.php
  18. +1 −1 app/Locale/ja_JP/translations.php
  19. +1 −1 app/Locale/ko_KR/translations.php
  20. +1 −1 app/Locale/my_MY/translations.php
  21. +1 −1 app/Locale/nb_NO/translations.php
  22. +1 −1 app/Locale/nl_NL/translations.php
  23. +1 −1 app/Locale/pl_PL/translations.php
  24. +1 −1 app/Locale/pt_BR/translations.php
  25. +1 −1 app/Locale/pt_PT/translations.php
  26. +1 −1 app/Locale/ro_RO/translations.php
  27. +1 −1 app/Locale/ru_RU/translations.php
  28. +1 −1 app/Locale/sr_Latn_RS/translations.php
  29. +1 −1 app/Locale/sv_SE/translations.php
  30. +1 −1 app/Locale/th_TH/translations.php
  31. +1 −1 app/Locale/tr_TR/translations.php
  32. +1 −1 app/Locale/vi_VN/translations.php
  33. +1 −1 app/Locale/zh_CN/translations.php
  34. +2 −2 app/Template/comment_mail/create.php
  35. +2 −2 app/Template/task_mail/create.php
  36. +1 −2 app/Validator/CommentValidator.php
  37. +1 −2 app/Validator/TaskValidator.php
  38. +7 −0 app/functions.php
  39. +2 −2 assets/js/app.min.js
  40. +10 −4 assets/js/components/autocomplete-email.js
  41. +1 −11 tests/units/Validator/CommentValidatorTest.php
  42. +2 −6 tests/units/Validator/TaskValidatorTest.php
  43. +1 −0 vendor/composer/autoload_classmap.php
  44. +1 −0 vendor/composer/autoload_static.php
@@ -9,14 +9,14 @@ Breaking changes:
New features:

* Add predefined templates for task descriptions
* Add the possibility to send tasks and comments to multiple recipients
* Add users, groups and projects search
* Add command line argument to display Kanboard version
* Add user backend provider system (to be used by external plugins)
* Romanian translation

Improvements:

* Improve docs
* Minor CSS improvements
* Add help message on project sharing page
* Task CSV import is now able to handle the priority, start date, tags and one external link
@@ -51,24 +51,25 @@ public function save()
protected function sendByEmail(array $values)
{
$html = $this->template->render('comment_mail/email', array(
'email' => $values,
));
$html = $this->template->render('comment_mail/email', array('email' => $values));
$emails = explode_csv_field($values['emails']);
$this->emailClient->send(
$values['email'],
$values['email'],
$values['subject'],
$html
);
foreach ($emails as $email) {
$this->emailClient->send(
$email,
$email,
$values['subject'],
$html
);
}
}
protected function prepareComment(array $values)
{
$values['comment'] .= "\n\n_".t('Sent by email to [%s](mailto:%s) (%s)', $values['email'], $values['email'], $values['subject']).'_';
$values['comment'] .= "\n\n_".t('Sent by email to "%s" (%s)', $values['emails'], $values['subject']).'_';
unset($values['subject']);
unset($values['email']);
unset($values['emails']);
return $values;
}
@@ -36,7 +36,7 @@ public function send()
$this->flash->success(t('Task sent by email successfully.'));
$this->commentModel->create(array(
'comment' => t('This task was sent by email to "%s" with subject "%s".', $values['email'], $values['subject']),
'comment' => t('This task was sent by email to "%s" with subject "%s".', $values['emails'], $values['subject']),
'user_id' => $this->userSession->getId(),
'task_id' => $task['id'],
));
@@ -49,15 +49,16 @@ public function send()
protected function sendByEmail(array $values, array $task)
{
$html = $this->template->render('task_mail/email', array(
'task' => $task,
));
$this->emailClient->send(
$values['email'],
$values['email'],
$values['subject'],
$html
);
$emails = explode_csv_field($values['emails']);
$html = $this->template->render('task_mail/email', array('task' => $task));
foreach ($emails as $email) {
$this->emailClient->send(
$email,
$email,
$values['subject'],
$html
);
}
}
}
@@ -67,9 +67,7 @@ public function importTask(array $row, $lineNumber)
$this->nbImportedTasks++;
if (! empty($row['tags'])) {
$tagsList = explode(',', $row['tags']);
array_walk($tagsList, function (&$value) { $value = trim($value); });
$this->taskTagModel->save($this->projectId, $taskId, $tagsList);
$this->taskTagModel->save($this->projectId, $taskId, explode_csv_field($row['tags']));
}
if (! empty($row['external_link'])) {
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Nemoguće priložiti datoteke, provjeri prava na "data" direktoriju na serveru.',
'Another category with the same name exists in this project' => 'Kategorija sa ovim imenom već postoji na ovom projektu',
'Comment sent by email successfully.' => 'Komentar je uspješno poslan email-om.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Pošalji email-om [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Pošalji email-om "%s" (%s)',
'Unable to read uploaded file.' => 'Nemoguće pročitati dodanu datoteku.',
'Database uploaded successfully.' => 'Baza podataka je uspješno dodana.',
'Task sent by email successfully.' => 'Zadatak je uspješno poslan email-om.',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'No es pot pujar arxius, comprovar els permisos de la carpeta de dades.',
'Another category with the same name exists in this project' => 'Una altra categoria amb el mateix nom existeix en aquest projecte',
'Comment sent by email successfully.' => 'Comentar enviat per correu electrònic amb èxit.',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
'Unable to read uploaded file.' => 'No es pot llegir el fitxer pujat.',
'Database uploaded successfully.' => 'Base de dades carregat correctament.',
'Task sent by email successfully.' => 'Tasca enviat per correu electrònic amb èxit.',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Dateien können nicht hochgeladen werden, überprüfen Sie die Berechtigungen Ihres Datenordners.',
'Another category with the same name exists in this project' => 'Eine weitere Kategorie mit demselben Namen existiert in diesem Projekt',
'Comment sent by email successfully.' => 'Kommentar wurde erfolgreich per E-Mail gesendet.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Wurde per E-Mail an [%s] gesendet (mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Wurde per E-Mail an [%s] gesendet "%s"',
'Unable to read uploaded file.' => 'Die hochgeladene Datei konnte nicht gelesen werden.',
'Database uploaded successfully.' => 'Die Datenbank wurde erfolgreich hochgeladen.',
'Task sent by email successfully.' => 'Aufgabe wurde erfolgreich per E-Mail gesendet.',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'No se pueden cargar archivos, verifique los permisos de su carpeta de datos (data)',
'Another category with the same name exists in this project' => 'Ya existe otra categoría con el mismo nombre en este proyecto',
'Comment sent by email successfully.' => 'Comentario enviado exitosamente por email',
'Sent by email to [%s](mailto:%s) (%s)' => 'Enviado por email a [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Enviado por email a "%s" (%s)',
'Unable to read uploaded file.' => 'No se pudo leer el archivo cargado',
'Database uploaded successfully.' => 'Base de datos cargada exitosamente',
'Task sent by email successfully.' => 'Tarea enviada exitosamente por email',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Impossible de transférer le ou les fichiers, vérifiez les permissions du répertoire de données.',
'Another category with the same name exists in this project' => 'Une autre catégorie avec le même nom existe dans ce projet',
'Comment sent by email successfully.' => 'Commentaire envoyé par email avec succès.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Envoyé par email à [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Envoyé par email à « %s » (%s)',
'Unable to read uploaded file.' => 'Impossible de lire le fichier téléversé.',
'Database uploaded successfully.' => 'Base de données téléversée avec succès.',
'Task sent by email successfully.' => 'Tâche envoyée par email avec succès.',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Nem lehet feltölteni fájlokat. Ellenőrizze az adatkönyvtár jogosultságait.',
'Another category with the same name exists in this project' => 'Már létezik egy ugyanilyen nevű kategória ebben a projektben',
'Comment sent by email successfully.' => 'A megjegyzés sikeresen elküldve e-mailben.',
'Sent by email to [%s](mailto:%s) (%s)' => 'E-mail küldve neki: [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'E-mail küldve neki: "%s" (%s)',
'Unable to read uploaded file.' => 'Nem lehet beolvasni a feltöltött fájlt.',
'Database uploaded successfully.' => 'Az adatbázis sikeresen feltöltve.',
'Task sent by email successfully.' => 'A feladat sikeresen elküldve e-mailben.',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'ファイルをアップロードできません。データフォルダのアクセス権を確認してください。',
'Another category with the same name exists in this project' => '同じ名前の別のカテゴリがプロジェクトに存在します',
'Comment sent by email successfully.' => 'メールでコメントを送信しました',
'Sent by email to [%s](mailto:%s) (%s)' => '%s をメールで送信しました(mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => '%s をメールで送信しました "%s"',
'Unable to read uploaded file.' => 'アップロードされたファイルを読み込めません',
'Database uploaded successfully.' => 'データベースをアップロードしました',
'Task sent by email successfully.' => 'タスクをメールで送信しました',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Incapaz de enviar arquivos. Verifique as permissões da sua pasta de dados.',
'Another category with the same name exists in this project' => 'Outra categoria com o mesmo nome existe neste projeto',
'Comment sent by email successfully.' => 'Comentário enviado por e-mail com sucesso.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Enviar por e-mail para [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Enviar por e-mail para "%s" (%s)',
'Unable to read uploaded file.' => 'Incapaz de ler arquivos enviados.',
'Database uploaded successfully.' => 'Base de dados enviado com sucesso.',
'Task sent by email successfully.' => 'Tarefa enviada por e-mail com sucesso.',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Impossivel enviar ficheiros, verifique as permissões da pasta data',
'Another category with the same name exists in this project' => 'Outra categoria com o mesmo nome já existe neste projecto',
'Comment sent by email successfully.' => 'Comentário enviado por email com sucesso.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Enviado por email para [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Enviado por email para "%s" (%s)',
'Unable to read uploaded file.' => 'Não foi possivel ler ficheiro enviado.',
'Database uploaded successfully.' => 'Base de dados enviada com sucesso.',
'Task sent by email successfully.' => 'Tarefa enviada por email com sucesso.',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Nu am putut încărca fișierele, verifică permisiunile directorului de date.',
'Another category with the same name exists in this project' => 'Altă categorie cu același nume există deja în proiect',
'Comment sent by email successfully.' => 'Comentariul a fost trimis prin e-mail.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Trimite prin e-mail la [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Trimite prin e-mail la "%s" (%s)',
'Unable to read uploaded file.' => 'Nu pot citi fișierul încărcat.',
'Database uploaded successfully.' => 'Baza de date a fost încărcată cu succes.',
'Task sent by email successfully.' => 'Sarcina a fost trimisă prin e-mail.',
@@ -1266,7 +1266,7 @@
'Unable to upload files, check the permissions of your data folder.' => 'Невозможно загрузить файлы, проверьте права доступа на папку "data".',
'Another category with the same name exists in this project' => 'Другая категория с таким же именем уже существует в этом проекте',
'Comment sent by email successfully.' => 'Комментарий успешно отправлен по e-mail.',
'Sent by email to [%s](mailto:%s) (%s)' => 'Отправлен по e-mail для [%s](mailto:%s) (%s)',
'Sent by email to "%s" (%s)' => 'Отправлен по e-mail для "%s" (%s)',
'Unable to read uploaded file.' => 'Не удаётся прочитать загруженный файл.',
'Database uploaded successfully.' => 'База данных успешно импортирована.',
'Task sent by email successfully.' => 'Задача успешно отправлена по e-mail.',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',
@@ -1266,7 +1266,7 @@
// 'Unable to upload files, check the permissions of your data folder.' => '',
// 'Another category with the same name exists in this project' => '',
// 'Comment sent by email successfully.' => '',
// 'Sent by email to [%s](mailto:%s) (%s)' => '',
// 'Sent by email to "%s" (%s)' => '',
// 'Unable to read uploaded file.' => '',
// 'Database uploaded successfully.' => '',
// 'Task sent by email successfully.' => '',

0 comments on commit 2a313eb

Please sign in to comment.
You can’t perform that action at this time.