HTML Email - adding data to note_mailtemplate.html

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
acoder2020
Posts: 66
Joined: 11 Jan 2024, 19:32

HTML Email - adding data to note_mailtemplate.html

Post by acoder2020 »

I'd like to add some of the main Issue data to note email notifications.

It looks like the array $p_visible_bug_data is passed for bug email notifications like:

Code: Select all

$t_message = email_template_bug_message( $p_visible_bug_data, $t_message );
The same array is not passed when sending note notifications:

Code: Select all

$t_message = email_template_bugnote($t_bugnote, $t_project_id, $t_show_time_tracking, $t_separator,$t_message );
Is `$p_visible_bug_data` a common system wide variable and could I pass that as an argument in `email_template_bugnote()`?
acoder2020
Posts: 66
Joined: 11 Jan 2024, 19:32

Re: HTML Email - adding data to note_mailtemplate.html

Post by acoder2020 »

What I'm aiming to add at the top of the existing table:
Screenshot from 2024-04-11 19-01-03.png
Screenshot from 2024-04-11 19-01-03.png (61.18 KiB) Viewed 131 times
Happy to try a pull request once I have a handle on what I need to do. I'm not super well versed with GIT but will do my best to learn.
cas
Posts: 1634
Joined: 11 Mar 2006, 16:08
Contact:

Re: HTML Email - adding data to note_mailtemplate.html

Post by cas »

This is around my mailtemplate development.
Please add request here: https://github.com/mantisbt-plugins/mailtemplate
I will then have a look if that is an option.
Please ad a printscreen how it now looks and how you want it to look and/or statwe clearly which fields you would like to have available.
cas
Posts: 1634
Joined: 11 Mar 2006, 16:08
Contact:

Re: HTML Email - adding data to note_mailtemplate.html

Post by cas »

This was pretty easy to do. Please download template_api.php from git and test it.
https://github.com/mantisbt-plugins/mai ... te_api.php

Future changes please request via Github
Post Reply