Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6272/core
Modified Files:
bug_api.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_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/bug_api.php,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- bug_api.php 24 Sep 2004 08:42:08 -0000 1.84
+++ bug_api.php 4 Oct 2004 16:53:13 -0000 1.85
@@ -693,7 +693,7 @@
# --------------------
# Update a bug from the given data structure
# If the third parameter is true, also update the longer strings table
- function bug_update( $p_bug_id, $p_bug_data, $p_update_extended = false
) {
+ function bug_update( $p_bug_id, $p_bug_data, $p_update_extended =
false, $p_bypass_mail = false ) {
$c_bug_id = db_prepare_int( $p_bug_id );
$c_bug_data = bug_prepare_db( $p_bug_data );
@@ -799,27 +799,29 @@
# Update the last update date
bug_update_date( $p_bug_id );
- $t_action_prefix = 'email_notification_title_for_action_bug_';
- $t_status_prefix = 'email_notification_title_for_status_bug_';
+ if ( false == $p_bypass_mail ) { # allow bypass
if user is sending mail separately
+ $t_action_prefix =
'email_notification_title_for_action_bug_';
+ $t_status_prefix =
'email_notification_title_for_status_bug_';
- # bug assigned
- if ( $t_old_data->handler_id != $p_bug_data->handler_id ) {
- email_generic( $p_bug_id, 'owner', $t_action_prefix .
'assigned' );
- return true;
- }
+ # bug assigned
+ if ( $t_old_data->handler_id != $p_bug_data->handler_id
) {
+ email_generic( $p_bug_id, 'owner',
$t_action_prefix . 'assigned' );
+ return true;
+ }
- # status changed
- if ( $t_old_data->status != $p_bug_data->status ) {
- $t_status = get_enum_to_string( config_get(
'status_enum_string' ), $p_bug_data->status );
- $t_status = str_replace( ' ', '_', $t_status );
- email_generic( $p_bug_id, $t_status, $t_status_prefix .
$t_status );
- return true;
- }
+ # status changed
+ if ( $t_old_data->status != $p_bug_data->status ) {
+ $t_status = get_enum_to_string( config_get(
'status_enum_string' ), $p_bug_data->status );
+ $t_status = str_replace( ' ', '_', $t_status );
+ email_generic( $p_bug_id, $t_status,
$t_status_prefix . $t_status );
+ return true;
+ }
- # @@@ handle priority change if it requires special handling
+ # @@@ handle priority change if it requires special
handling
- # generic update notification
- email_generic( $p_bug_id, 'updated', $t_action_prefix .
'updated' );
+ # generic update notification
+ email_generic( $p_bug_id, 'updated', $t_action_prefix .
'updated' );
+ }
return true;
}
-------------------------------------------------------
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
|