I was trying to customize my email templates to include a node title after the task name and could not figure out why it was not displaying my override. After bashing my head in a few times I figured out that it was actually displaying the workflow name instead of the task name. Apparently order is very important to str_replace and the hashes are useless. str_replace will replace the first element of the search array with the first element of the replace array and so forth. To fix this on line 108ish of maestro_notification.class.php change:
$tokens = array('task_console_url' => '[task_console_url]', 'workflow_name' => '[workflow_name]', 'task_name' => '[task_name]', 'task_owner' => '[task_owner]');
to
$tokens = array('task_console_url' => '[task_console_url]', 'task_name' => '[task_name]', 'workflow_name' => '[workflow_name]', 'task_owner' => '[task_owner]');
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1387362-task-name-replace-with-workflow-name-02.patch | 864 bytes | haydeniv |
Comments
Comment #1
kevin.klika commentedThis is unbelievable! I ran into the same issue, and this person provided the exact resolution to the problem. I have confirmed this bug fix... Why has this not been rolled in yet? Two years old... I'm not using Git for my site otherwise I would post a diff...
:(
Comment #2
haydeniv commentedCan't believe it has been this long. I've stopped using Maestro since then but for good measure here is a patch. :)
Comment #3
blainelang commentedThis was clearly the case of us just loosing track of this issue and solution and not us being lazy, so please go easy on the condemnation. We are all trying to contribute our time here and you can see by the commit history for this project that it's far from being ignored.
The patch has now been committed.
Thanks for your report and patch.
Comment #4
blainelang commentedComment #5
haydeniv commentedJust for clarification my comments were in reference to that I had long forgotten about this issue, not trying to be snarky. :) Thanks for the great work!