View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012549 | mantisbt | bugtracker | public | 2010-11-21 05:48 | 2014-12-08 02:08 |
Reporter | gthomas | Assigned To | dhx | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0dev | ||||
Target Version | 1.3.0-beta.1 | ||||
Summary | 0012549: Changing status form always creates private note | ||||
Description | bug_change_status_page.php sets "private" form variable a boolean. | ||||
Additional Information | Patch attached. | ||||
Tags | patch | ||||
Attached Files | bugnote-private.patch (1,505 bytes)
commit 4dc516b10c20e57a17569b9277ca93aa5c222b58 Author: Gulacsi Tamas <tgulacsi@websrv.unosoft.dmz> Date: Sun Nov 21 11:39:08 2010 +0100 fix bug_update error with adding bugnote (always private) diff --git a/bug_update.php b/bug_update.php index d47a39d..0842a7d 100644 --- a/bug_update.php +++ b/bug_update.php @@ -123,7 +123,7 @@ $t_updated_bug->view_state = gpc_get_int( 'view_state', $t_existing_bug->view_st $t_bug_note = new BugNoteData(); $t_bug_note->note = gpc_get_string( 'bugnote_text', '' ); -$t_bug_note->view_state = gpc_get_bool( 'private', config_get( 'default_bugnote_view_status' ) ); +$t_bug_note->view_state = gpc_get_bool( 'private', config_get( 'default_bugnote_view_status' ) == VS_PRIVATE ) ? VS_PRIVATE : VS_PUBLIC; $t_bug_note->time_tracking = gpc_get_string( 'time_tracking', '0:00' ); # Determine whether the new status will reopen, resolve or close the issue. @@ -355,7 +355,8 @@ foreach ( $t_custom_fields_to_set as $t_custom_field_to_set ) { # Add a bug note if there is one. if ( $t_bug_note->note || helper_duration_to_minutes( $t_bug_note->time_tracking ) > 0 ) { - bugnote_add( $f_bug_id, $t_bug_note->note, $t_bug_note->time_tracking, $t_bug_note->view_state, 0, '', null, false ); +log_event(LOG_FILTERING, "bugnote_add($f_bug_id, ".$t_bug_note->view_state.')'); + bugnote_add( $f_bug_id, $t_bug_note->note, $t_bug_note->time_tracking, $t_bug_note->view_state == VS_PRIVATE, 0, '', null, false ); } # Add a duplicate relationship if requested. | ||||
MantisBT: master 93b581bf 2011-02-26 05:15 Committer: dhx Details Diff |
Fix 0012549: Bug change status form always creates private bug notes Due to invalid handling of boolean types and built in view state constants, bug notes added via the bug change status form were ignoring the "private" checkbox. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0012549 |
|
mod - bug_update.php | Diff File |