Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Issue #12096: Add reporter and handler to monitor list on duplicate
When an issue X is resolved as a duplicate of an existing issue Y, the
monitor list from X is copied to and merged with Y. However the reporter
and handler of the source issue are not copied unless they're on the
monitor list.

This change ensures that the reporter and handler of the source issue
are added to the monitor list on the destination issue. These users are
thus less likely to become out-of-the-loop on an issue that is relevant
to them.
  • Loading branch information
davidhicks committed Jun 23, 2010
1 parent 69c55f9 commit 4c79152
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/bug_api.php
Expand Up @@ -1623,6 +1623,14 @@ function bug_resolve( $p_bug_id, $p_resolution, $p_fixed_in_version = '', $p_bug
} # else relationship is -1 - same type exists, do nothing

# Copy list of users monitoring the duplicate bug to the original bug
$t_old_reporter_id = bug_get_field( $p_bug_id, 'reporter_id' );
$t_old_handler_id = bug_get_field( $p_bug_id, 'handler_id' );
if ( user_exists( $t_old_reporter_id ) ) {
bug_monitor( $p_duplicate_id, $t_old_reporter_id );
}
if ( user_exists ( $t_old_handler_id ) ) {
bug_monitor( $p_duplicate_id, $t_old_handler_id );
}
bug_monitor_copy( $p_bug_id, $p_duplicate_id );

bug_set_field( $p_bug_id, 'duplicate_id', (int) $p_duplicate_id );
Expand Down

0 comments on commit 4c79152

Please sign in to comment.