View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003589 | mantisbt | public | 2004-02-20 07:36 | 2016-01-01 13:09 | |
| Reporter | morganparry | Assigned To | vboctor | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | duplicate | ||
| Summary | 0003589: Previous handlers not notified of change of assignment | ||||
| Description | When a bug is reassigned to another user, the previous handler doesn't get an email to tell them about this. | ||||
| Additional Information | I fixed this in our installation by modifying email_assign() in email_api.php to look like this:
Then in the bug_update() function, in bug_api.php, I modified the ASSIGNED case, around line 583 in v0.18.1, to look like this: | ||||
| Tags | patch | ||||
| Attached Files | assign_diff.txt (3,297 bytes)
==== core/bug_api.php#2 (text) ====
@@ -830,7 +830,7 @@
# bug assigned
if ( $t_old_data->handler_id != $p_bug_data->handler_id ) {
- email_generic( $p_bug_id, 'owner', $t_action_prefix . 'assigned' );
+ email_assign( $p_bug_id, $t_old_data->handler_id );
return true;
}
@@ -1113,7 +1113,7 @@
bug_clear_cache( $p_bug_id );
# send assigned to email
- email_assign( $p_bug_id );
+ email_assign( $p_bug_id, $h_handler_id );
}
return true;
==== core/email_api.php#2 (text) ====
@@ -169,7 +169,7 @@
# @@@ yarick123: email_collect_recipients(...) will be completely rewritten to provide additional
# information such as language, user access,..
# @@@ yarick123:sort recipients list by language to reduce switches between different languages
- function email_collect_recipients( $p_bug_id, $p_notify_type ) {
+ function email_collect_recipients( $p_bug_id, $p_notify_type, $p_additional_recipient_ids = null ) {
$c_bug_id = db_prepare_int( $p_bug_id );
$t_recipients = array();
@@ -241,6 +241,15 @@
}
}
+ # Any additional recipients provided.
+ if( !is_null($p_additional_recipient_ids) ) {
+ foreach( $p_additional_recipient_ids as $t_additional_id ) {
+ if( $t_additional_id ) {
+ $t_recipients[$t_additional_id] = true;
+ }
+ }
+ }
+
# set up to eliminate unwanted users
# get list of status values that are not covered specifically in the prefs
# These are handled by email_on_status generically
@@ -427,7 +436,7 @@
# $p_notify_type: use check who she get notified of such event.
# $p_message_id: message id to be translated and included at the top of the email message.
# Return false if it were problems sending email
- function email_generic( $p_bug_id, $p_notify_type, $p_message_id = null, $p_header_optional_params = null ) {
+ function email_generic( $p_bug_id, $p_notify_type, $p_message_id = null, $p_header_optional_params = null, $p_additional_recipient_ids = null ) {
$t_ok = true;
if ( ON === config_get( 'enable_email_notification' ) ) {
ignore_user_abort( true );
@@ -435,7 +444,7 @@
# @@@ yarick123: email_collect_recipients(...) will be completely rewritten to provide additional
# information such as language, user access,..
# @@@ yarick123:sort recipients list by language to reduce switches between different languages
- $t_recipients = email_collect_recipients( $p_bug_id, $p_notify_type );
+ $t_recipients = email_collect_recipients( $p_bug_id, $p_notify_type, $p_additional_recipient_ids );
$t_project_id = bug_get_field( $p_bug_id, 'project_id' );
if ( is_array( $t_recipients ) ) {
@@ -599,8 +608,8 @@
}
# --------------------
# send notices when a bug is ASSIGNED
- function email_assign( $p_bug_id ) {
- email_generic( $p_bug_id, 'owner', 'email_notification_title_for_action_bug_assigned' );
+ function email_assign( $p_bug_id, $p_old_handler_id = 0 ) {
+ email_generic( $p_bug_id, 'owner', 'email_notification_title_for_action_bug_assigned', null, array($p_old_handler_id) );
}
# --------------------
# send notices when a bug is DELETED
| ||||
|
Updated patches for v0.18.2:
to |
|
|
I've attached a unified diff against 1.0.5 to fix this. |
|