Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6272
Modified Files:
bug_update.php
Log Message:
fix for 0004652: Fixed in Version not applyed to Bug at CLOSE
Solution is more generic. All changed state information is updated for
any update using bug_api:bug_update, but added a flag to supress email
messaging in certain changes
Index: bug_update.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update.php,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- bug_update.php 28 Sep 2004 15:11:36 -0000 1.72
+++ bug_update.php 4 Oct 2004 16:53:12 -0000 1.73
@@ -106,6 +106,8 @@
}
}
+ $t_notify = true;
+ $t_bug_note_set = false;
if ( ( $t_old_bug_status != $t_bug_data->status ) && ( FALSE ==
$f_update_mode ) ) {
# handle status transitions that come from pages other than
bug_*update_page.php
# this does the minimum to act on the bug and sends a specific
message
@@ -114,6 +116,8 @@
# bug_resolve updates the status and bugnote
and sends message
bug_resolve( $f_bug_id,
$t_bug_data->resolution, $t_bug_data->fixed_in_version,
$f_bugnote_text,
$t_bug_data->duplicate_id, $t_bug_data->handler_id);
+ $t_notify = false;
+ $t_bug_note_set = true;
if ( $f_close_now ) {
bug_set_field( $f_bug_id, 'status',
CLOSED );
@@ -123,37 +127,28 @@
case CLOSED:
# bug_close updates the status and bugnote and
sends message
bug_close( $f_bug_id, $f_bugnote_text );
+ $t_notify = false;
+ $t_bug_note_set = true;
break;
case config_get( 'bug_reopen_status' ):
if ( $t_old_bug_status >= config_get(
'bug_resolved_status_threshold' ) ) {
# bug_reopen updates the status and
bugnote and sends message
bug_reopen( $f_bug_id, $f_bugnote_text
);
+ $t_notify = false;
+ $t_bug_note_set = true;
break;
} # else fall through to default
-
- default:
- # Add a bugnote if there is one
- if ( !is_blank( $f_bugnote_text ) ) {
- bugnote_add( $f_bug_id,
$f_bugnote_text, $f_private );
- }
-
- # Update the bug entry
- # bug_update sends a generic message
- bug_update( $f_bug_id, $t_bug_data, true );
- break;
}
- }else{
- # handle other updates that come from bug_*update_page.php or
where status has not changed
+ }
- # Add a bugnote if there is one
- if ( !is_blank( $f_bugnote_text ) ) {
- bugnote_add( $f_bug_id, $f_bugnote_text, $f_private );
- }
+ # Add a bugnote if there is one
+ if ( ( !is_blank( $f_bugnote_text ) ) && ( false == $t_bug_note_set ) )
{
+ bugnote_add( $f_bug_id, $f_bugnote_text, $f_private );
+ }
- # Update the bug entry
- bug_update( $f_bug_id, $t_bug_data, true );
- }
+ # Update the bug entry, notify if we haven't done so already
+ bug_update( $f_bug_id, $t_bug_data, true, ( false == $t_notify ) );
helper_call_custom_function( 'issue_update_notify', array( $f_bug_id )
);
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
|