View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0009921 | mantisbt | bugtracker | public | 2008-12-01 13:14 | 2009-01-15 11:26 |
| Reporter | mthibeault | Assigned To | grangeway | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.2.0a2 | ||||
| Fixed in Version | 1.2.0a3 | ||||
| Summary | 0009921: Not all the options you usually get when doing normal updates (ie resolve, close, etc) are available when doing mass updates. | ||||
| Description | When trying to complete mass updates, some options are missing from the usual set of available changes. Namely, it is impossible to add a note to all the updated issues. | ||||
| Tags | No tags attached. | ||||
| Attached Files | bugnote_on_update-partial.diff (4,013 bytes)
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 @@
}
?>
+<?php
+if( $t_bugnote ) {
+?>
+<tr class="row-1">
+ <td class="category">
+ <?php echo lang_get( 'add_bugnote_title' ); ?>
+ </td>
+ <td>
+ <textarea name="bugnote_text" cols="80" rows="10"></textarea>
+ </td>
+</tr>
+<?php
+}
+?>
<tr>
<td class="center" colspan="2">
<input type="submit" class="button" value="<?php echo $t_button_title ?>" />
| ||||
|
Patch added which is only very partial (I'll prolly never complete the rest because it is not needed where I work). It only adds the possibility to join notes to changes when doing mass close, resolve, assign, or change status. |
|
|
commited a modified version of your patch to git. http://git.mantisbt.org/?p=mantisbt.git;a=commit;h=88fe1dc730241080e4112ea67598df8af0507f9b Paul |
|
|
MantisBT: master 88fe1dc7 2008-12-06 12:33 Paul Richards Details Diff |
Fix 0009921: Not all the options you usually get when doing normal updates (ie resolve, close, etc) are available when doing mass updates. |
Affected Issues 0009921 |
|
| mod - bug_actiongroup.php | Diff File | ||
| mod - bug_actiongroup_page.php | Diff File | ||