Hi!
We are using Mantis 0.19.2. The following thing I want to achieve:
I'm working on a helpdesk and I want our users to be informed by e-mail when they report an incident.
At one hand, we have our IT employees. They are already in the system as reporters and managers etc. This can be configured easily by using the functionality of Mantis.
At the other hand, we have our customers. They report an incident with our helpdesk, and we then want to keep them informed by e-mail. I want them to receive the same update e-mails as we receive.
I can not easily add them to the mantis database because I can simply not add them to a separate 'list'.
Can anyone explain to me how I can achieve this?
Thanks in advance.
Regards from Holland.
Mail to customers
Moderators: Developer, Contributor
-
Mark
is this possible?
Does anyone have an idea if this can be done through Mantis?
Thanks in advance!
Thanks in advance!
Firstly, you need to set up a custom field (eg. "Copy Email to:") that you will fill with an email address (or whatever).
Secondly, in custom_functions_inc.php in the root directly, write a function with the 'fingerprint' of:
This will override the current custom_function_default_issue_update_notify(...) function (that is blank by default, anyway).
This function will get called after the bug is updated, so you probably won't be easily able to get the email to be exactly what is sent to everyone else, however you can still send an email or whatever you want from within this function.
Basically what you need to do in your custom_function_override_issue_update_notify(...) function is:
1) Get the ID of the custom field that you are using. Call custom_field_get_id_from_name( $p_field_name ) where $p_field_name is obviously the name of the field that you are using to store the email address.
2) Call custom_field_get_value( $p_field_id, $p_bug_id ) where $p_field_id is the value returned in step 1 and $p_bug_id is the parameter passed in to the main function.
3) Use the returned value to do whatever you like. I would suggest looking into calling email_send( $p_recipient, $p_subject, $p_message ) or something similar.
I hope that makes a bit more sense for you.
Lincoln.
Secondly, in custom_functions_inc.php in the root directly, write a function with the 'fingerprint' of:
Code: Select all
# --------------------
# Hook to notify after an issue has been updated.
# In case of errors, this function should call trigger_error()
# p_issue_id is the issue number that can be used to get the existing state
function custom_function_override_issue_update_notify( $p_issue_id ) {
}
This function will get called after the bug is updated, so you probably won't be easily able to get the email to be exactly what is sent to everyone else, however you can still send an email or whatever you want from within this function.
Basically what you need to do in your custom_function_override_issue_update_notify(...) function is:
1) Get the ID of the custom field that you are using. Call custom_field_get_id_from_name( $p_field_name ) where $p_field_name is obviously the name of the field that you are using to store the email address.
2) Call custom_field_get_value( $p_field_id, $p_bug_id ) where $p_field_id is the value returned in step 1 and $p_bug_id is the parameter passed in to the main function.
3) Use the returned value to do whatever you like. I would suggest looking into calling email_send( $p_recipient, $p_subject, $p_message ) or something similar.
I hope that makes a bit more sense for you.
Lincoln.
Custom fields are defined from within the normal management windows: no coding necessary. As an administrator, you should be able to click through "Manage" to "Manage Custom Fields".
Having said all of that, I just noticed that you're on 0.19.2. I have a feeling custom fields were available in that version, but you *might* need to upgrade...
Having said all of that, I just noticed that you're on 0.19.2. I have a feeling custom fields were available in that version, but you *might* need to upgrade...