don't show history in emails notifications

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
rondezo
Posts: 85
Joined: 09 Feb 2021, 09:18

don't show history in emails notifications

Post by rondezo »

Hello, all!
how do I disable showing the task history in notifications about a new task, assignment, and closing of tasks?
Attachments
Снимок экрана в 2021-03-09 12-13-21.png
Снимок экрана в 2021-03-09 12-13-21.png (17.77 KiB) Viewed 1819 times
Last edited by rondezo on 09 Mar 2021, 09:13, edited 1 time in total.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: don't show history in emails notifications

Post by cas »

Are you referring to the task plugin or talking about the history records of the issue?
rondezo
Posts: 85
Joined: 09 Feb 2021, 09:18

Re: don't show history in emails notifications

Post by rondezo »

cas wrote: 09 Mar 2021, 09:13 Are you referring to the task plugin or talking about the history records of the issue?
I mean that in the emails that users receive, the history of the issue is not included
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: don't show history in emails notifications

Post by cas »

You can switch off history by adding this setting to config/config_inc.php:
history_default_visible = OFF;

If you only want to omit it from the emails, a change to core script is required (which is very simple) :mrgreen:
rondezo
Posts: 85
Joined: 09 Feb 2021, 09:18

Re: don't show history in emails notifications

Post by rondezo »

cas wrote: 09 Mar 2021, 09:24 You can switch off history by adding this setting to config/config_inc.php:
history_default_visible = OFF;

If you only want to omit it from the emails, a change to core script is required (which is very simple) :mrgreen:
i want to omit it from the emails only
Pls , in which file and what should be replaced?
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: don't show history in emails notifications

Post by cas »

Well do remember that you have to make this adjustment every time you do an upgrade :mrgreen:

here is the quick and dirty way
Open up /core/email_api.php
find the function email_build_visible_bug_data
find the line : $t_bug_data['history'] = history_get_raw_events_array( $p_bug_id, $p_user_id );
just put a # sign at the beginning of this line, that is all.

You also can look at this topic for another solution:
https://www.mantisbt.org/forums/viewtop ... 15&t=27139
rondezo
Posts: 85
Joined: 09 Feb 2021, 09:18

Re: don't show history in emails notifications

Post by rondezo »

cas wrote: 09 Mar 2021, 11:14 Well do remember that you have to make this adjustment every time you do an upgrade :mrgreen:

here is the quick and dirty way
Open up /core/email_api.php
find the function email_build_visible_bug_data
find the line : $t_bug_data['history'] = history_get_raw_events_array( $p_bug_id, $p_user_id );
just put a # sign at the beginning of this line, that is all.

You also can look at this topic for another solution:
https://www.mantisbt.org/forums/viewtop ... 15&t=27139
Ths!!!! it's worked! SOLVED!
Post Reply