logo       

mantisbt bug_update.php,1.72,1.73: msg#00013

Subject: mantisbt bug_update.php,1.72,1.73
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe