E-Mail config options

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Frederic
Posts: 7
Joined: 24 Jan 2007, 09:03

E-Mail config options

Post by Frederic »

Hi there,

i´ve got a question about the email settings in the config_defaults_inc.php
(Mantis 1.06)

I think I dont really understand how to use the array default_notify_flags / notify_flags.
Mantis should send Emails to all users with access level >= Reporter
when a new bug is submitted, and if a bug is closed.


Thanks for your help!
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Post by deboutv »

You need to set this:

$g_notify_flags['new']['threshold_min'] = REPORTER;
$g_notify_flags['new']['threshold_max'] = MANAGER;

You can change REPORTER and/or MANAGER to another level.

When a bug is closed, I think it is:

$g_notify_flags['closed']['threshold_min'] = REPORTER;
$g_notify_flags['closed']['threshold_max'] = MANAGER;
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
Frederic
Posts: 7
Joined: 24 Jan 2007, 09:03

Post by Frederic »

Thank you very much for your fast answer.
I hoped the soloution would be another setting, because I´ve allready tried this config. I have to say, that I customised the bug_status_enum_strings and some other options. I thought that this should have no effect to the email notification when a bug is added, because the email function email_new_bug is on the bug_report_page with no reference to the bug_status.
Perhaps i can modify the email_collect_recipients function, to get all users with access-level above reporter on notify_type 'new'.

----- edit:

mhh, looks like the function allready collects all project users who meet the min_threshold..
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Post by deboutv »

To understand the email notification you can use the following variables:

$g_log_level = LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/tmp/email.log';

If you want to change the PHP code, I recommend you to do that into the custom_functions_inc.php with the function "custom_function_override_issue_create_notify".
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
Frederic
Posts: 7
Joined: 24 Jan 2007, 09:03

Post by Frederic »

Thanks again!

I just wanted to write an own function to log the recipients :oops:


I know it would be better (easier) to make changes into the custom_function_inc.php on little changes.
I´m doing an apprenticeship at the moment, one of my duties is to modify the mantis_bug_tracker to a 2nd instance-modul, which is used to manage changerequests. There are some requirements for this modul, which need to be done by modifying the php files.

So it could be that i will come here with some other questions : )

Thx for the tip about the log-function, think i will get it with that.
Post Reply