Add the possibility to create a comment when a task is sent by email
This commit is contained in:
parent
43e4662b84
commit
e27148dfd8
|
|
@ -4,6 +4,7 @@ Version 1.0.45 (unreleased)
|
|||
New features:
|
||||
|
||||
* Automatic action to assign tasks to its creator
|
||||
* Add the possibility to create a comment when a task is sent by email
|
||||
|
||||
Version 1.0.44 (May 28, 2017)
|
||||
-----------------------------
|
||||
|
|
|
|||
|
|
@ -33,6 +33,15 @@ class TaskMailController extends BaseController
|
|||
if ($valid) {
|
||||
$this->sendByEmail($values, $task);
|
||||
$this->flash->success(t('Task sent by email successfully.'));
|
||||
|
||||
if (isset($values['add_comment']) && $values['add_comment'] == 1) {
|
||||
$this->commentModel->create(array(
|
||||
'comment' => t('This task was sent by email to "%s" with subject "%s".', $values['email'], $values['subject']),
|
||||
'user_id' => $this->userSession->getId(),
|
||||
'task_id' => $task['id'],
|
||||
));
|
||||
}
|
||||
|
||||
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true);
|
||||
} else {
|
||||
$this->create($values, $errors);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
'DKK - Danish Krona' => 'DKK - Couronne danoise',
|
||||
'Remove user from group' => 'Supprimer cet utilisateur du groupe',
|
||||
'Assign the task to its creator' => 'Assigner une tâche à son créateur',
|
||||
'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».',
|
||||
'Log this action in a comment' => 'Enregistrez cette action dans un commentaire',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
'DKK - Danish Krona' => 'Dán korona',
|
||||
'Remove user from group' => 'Felhasználó eltávolítása a csoportból',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
'DKK - Danish Krona' => 'DKK - Coroa Dinamarquesa',
|
||||
'Remove user from group' => 'Remover usuário do grupo',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1335,4 +1335,6 @@ return array(
|
|||
// 'DKK - Danish Krona' => '',
|
||||
// 'Remove user from group' => '',
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
<?= $this->form->label(t('Subject'), 'subject') ?>
|
||||
<?= $this->form->text('subject', $values, $errors, array('required', 'tabindex="2"')) ?>
|
||||
|
||||
<?= $this->form->checkbox('add_comment', t('Log this action in a comment'), 1) ?>
|
||||
|
||||
<?= $this->modal->submitButtons(array(
|
||||
'submitLabel' => t('Send by email'),
|
||||
'tabindex' => 3,
|
||||
|
|
|
|||
Loading…
Reference in New Issue