Page 1 of 1

don't show history in emails notifications

Posted: 09 Mar 2021, 09:09
by rondezo
Hello, all!
how do I disable showing the task history in notifications about a new task, assignment, and closing of tasks?

Re: don't show history in emails notifications

Posted: 09 Mar 2021, 09:13
by cas
Are you referring to the task plugin or talking about the history records of the issue?

Re: don't show history in emails notifications

Posted: 09 Mar 2021, 09:16
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

Re: don't show history in emails notifications

Posted: 09 Mar 2021, 09:24
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:

Re: don't show history in emails notifications

Posted: 09 Mar 2021, 09:59
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?

Re: don't show history in emails notifications

Posted: 09 Mar 2021, 11:14
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

Re: don't show history in emails notifications

Posted: 09 Mar 2021, 11:49
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!