diff -N -a --unified -r mantisbt/bug_actiongroup.php mantisbt-bugnote_update/bug_actiongroup.php --- mantisbt/bug_actiongroup.php 2008-11-30 14:16:41.000000000 -0500 +++ mantisbt-bugnote_update/bug_actiongroup.php 2008-12-01 13:03:56.347041500 -0500 @@ -36,7 +36,7 @@ $f_action = gpc_get_string( 'action' ); $f_custom_field_id = gpc_get_int( 'custom_field_id', 0 ); $f_bug_arr = gpc_get_int_array( 'bug_arr', array() ); - + $f_bug_notetext = gpc_get_string( 'bugnote_text', '' ); $t_form_name = 'bug_actiongroup_' . $f_action; form_security_validate( $t_form_name ); @@ -77,7 +77,7 @@ bug_check_workflow($t_status, CLOSED) ) { # @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_bug_data, $f_bugnote_text ) ); - bug_close( $t_bug_id ); + bug_close( $t_bug_id, $f_bug_notetext ); helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) ); } else { if ( ! access_can_close_bug( $t_bug_id ) ) { @@ -132,7 +132,7 @@ access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ), $t_bug_id ) && bug_check_workflow($t_status, $t_assign_status ) ) { # @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); - bug_assign( $t_bug_id, $f_assign ); + bug_assign( $t_bug_id, $f_assign, $f_bug_notetext ); helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) ); } else { if ( bug_check_workflow($t_status, $t_assign_status ) ) { @@ -151,7 +151,7 @@ $f_resolution = gpc_get_int( 'resolution' ); $f_fixed_in_version = gpc_get_string( 'fixed_in_version', '' ); # @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); - bug_resolve( $t_bug_id, $f_resolution, $f_fixed_in_version ); + bug_resolve( $t_bug_id, $f_resolution, $f_fixed_in_version, $f_bug_notetext ); helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) ); } else { if ( ( $t_status < $t_resolved_status ) && @@ -181,6 +181,12 @@ if ( TRUE == bug_check_workflow($t_status, $f_status ) ) { # @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); bug_set_field( $t_bug_id, 'status', $f_status ); + + # Add bugnote if supplied + if ( !is_blank( $f_bug_notetext ) ) { + bugnote_add( $t_bug_id, $f_bug_notetext ); + } + helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) ); } else { $t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_status' ); diff -N -a --unified -r mantisbt/bug_actiongroup_page.php mantisbt-bugnote_update/bug_actiongroup_page.php --- mantisbt/bug_actiongroup_page.php 2008-11-30 14:16:41.000000000 -0500 +++ mantisbt-bugnote_update/bug_actiongroup_page.php 2008-12-01 13:04:37.954019800 -0500 @@ -97,6 +97,7 @@ $t_finished = true; $t_question_title = lang_get( 'close_bugs_conf_msg' ); $t_button_title = lang_get( 'close_group_bugs_button' ); + $t_bugnote = true; break; case 'DELETE' : @@ -139,6 +140,7 @@ $t_question_title2 = lang_get( 'fixed_in_version' ); $t_form2 = 'fixed_in_version'; } + $t_bugnote = true; break; case 'UP_PRIOR' : @@ -153,6 +155,7 @@ $t_button_title = lang_get( 'status_group_bugs_button' ); $t_form = 'status'; $t_request = 'status'; + $t_bugnote = true; break; case 'UP_CATEGORY' : @@ -303,6 +306,20 @@ } ?> + + + + + + + + + +