Limit history in notification emails only

Post about your customizations to share with others.

Moderators: Contributor, Developer

Post Reply
LewisR
Posts: 5
Joined: Jan 05, 2014 2:02 am
Location: New York, USA
Contact:

Limit history in notification emails only

Post by LewisR » Dec 02, 2018 10:39 pm

Hi, all...

I'm trying to set a low limit on the amount of history included in email notifications (ver 1.2.18) while keeping the full history available on the view bug page. Any thoughts on where I should look to make this mod? It can be a one-size-fits-all change, to say, maximum 6 history entries per email.

If this is a feature added in a later release, I've been putting off a major upgrade, but I might look at it again (I know this installation is long overdue).

TIA
Lewis
------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC www.2rosenthals.com
visit my IT blog www.2rosenthals.net/wordpress

atrol
Site Admin
Posts: 7394
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Limit history in notification emails only

Post by atrol » Dec 03, 2018 2:51 am

There is a setting "E-mail Notes Limit" on page My Account > Preferences
Please use Search before posting and read the Manual

LewisR
Posts: 5
Joined: Jan 05, 2014 2:02 am
Location: New York, USA
Contact:

Re: Limit history in notification emails only

Post by LewisR » Dec 03, 2018 10:09 am

Thanks, and indeed so. However, I don't want to limit the notes, just the bug history in the email. For example, in this particular installation, we have some ongoing work which is tracked in bugs. One of these has 144 attachments. Each attachment triggers an update to the bug history, as does each additional note. At a certain point, while the notes may still be relevant, knowing when someone attached a file is not. The notification emails are long enough. We might want to see recent history, but not entries for which attachment was made 9 months ago.
Lewis
------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC www.2rosenthals.com
visit my IT blog www.2rosenthals.net/wordpress

atrol
Site Admin
Posts: 7394
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Limit history in notification emails only

Post by atrol » Dec 03, 2018 2:30 pm

There is no option to get what you want, also not in latest version.

You could completely remove history from email by adding the following line to file config_inc.php

Code: Select all

$g_history_default_visible = OFF;
To get exactly what you want, you would have to change function email_format_bug_message in file core/email_api.php.
Please use Search before posting and read the Manual

LewisR
Posts: 5
Joined: Jan 05, 2014 2:02 am
Location: New York, USA
Contact:

Re: Limit history in notification emails only

Post by LewisR » Dec 03, 2018 3:20 pm

To get exactly what you want, you would have to change function email_format_bug_message in file core/email_api.php.
Thanks! That's exactly the pointer I needed!
Lewis
------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC www.2rosenthals.com
visit my IT blog www.2rosenthals.net/wordpress

Post Reply