Skip to content

Commit

Permalink
Try to fix project name
Browse files Browse the repository at this point in the history
- WIP #14
  • Loading branch information
aljawaid committed Jan 15, 2023
1 parent 97a304a commit 8b9b031
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Action/EmailTaskHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function doAction(array $data)

$historySent = FALSE;

$project_id = $this->projectModel->getById($data['task']['project_id']);
$project = $this->projectModel->getById($data['task']['project_id']);

// SUBJECT OPTIONS
if ($this->getParam('check_box_include_title') == true ) {
Expand All @@ -68,32 +68,32 @@ public function doAction(array $data)

} elseif ($this->getParam('check_box_include_project') == true ) {
// PROJECT NAME // Subject becomes: `subject` `project name` `task title` `task id`
$project = $this->projectModel->getById($project_id);
$project = $this->projectModel->getById($project);
$subject = $this->getParam('subject') . ": " . $project['name'] . " " . $data['task']['title'] . " (#" . $data['task']['id'] . ")";

} elseif ($this->getParam('check_box_include_title') == true && $this->getParam('check_box_include_project_identifier')) {
// PROJECT IDENTIFIER // Subject becomes: `subject` `project identifier`
$project = $this->projectModel->getById($project_id);
$project = $this->projectModel->getById($project);
$subject = $this->getParam('subject') . ": " . $project['identifier'];

} elseif ($this->getParam('check_box_include_title') == true && $this->getParam('check_box_include_project_identifier')) {
// PROJECT IDENTIFIER + TITLE // Subject becomes: `subject` `project identifier` `task title` `task id`
$project = $this->projectModel->getById($project_id);
$project = $this->projectModel->getById($project);
$subject = $this->getParam('subject') . ": " . $project['identifier'] . " " . $data['task']['title'] . " (#" . $data['task']['id'] . ")";

} elseif ($this->getParam('check_box_include_project') == true && $this->getParam('check_box_include_project_identifier')) {
// PROJECT NAME + PROJECT IDENTIFIER // Subject becomes: `subject` `project identifier`
$project = $this->projectModel->getById($project_id);
$project = $this->projectModel->getById($project);
$subject = $this->getParam('subject') . ": " . $project['name'] . " " . $project['identifier'];

} elseif ($this->getParam('check_box_include_title') == true && $this->getParam('check_box_include_project')) {
// PROJECT NAME + TITLE // Subject becomes: `subject` `project name` `task title` `task id`
$project = $this->projectModel->getById($project_id);
$project = $this->projectModel->getById($project);
$subject = $this->getParam('subject') . ": " . $project['name'] . " " . $data['task']['title'] . " (#" . $data['task']['id'] . ")";

} elseif ($this->getParam('check_box_include_title') == true && $this->getParam('check_box_include_project_identifier') && $this->getParam('check_box_include_project')) {
// PROJECT NAME + PROJECT IDENTIFIER + TITLE // Subject becomes: `subject` `project name` `project identifier` `task title` `task id`
$project = $this->projectModel->getById($project_id);
$project = $this->projectModel->getById($project);
$subject = $this->getParam('subject') . ": " . $project['name'] . " " .$project['identifier'] . " " . $data['task']['title'] . " (#" . $data['task']['id'] . ")";

} else {
Expand Down

0 comments on commit 8b9b031

Please sign in to comment.