View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007633 | mantisbt | bugtracker | public | 2006-12-07 11:47 | 2014-09-23 18:05 |
Reporter | robocoder | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.0.6 | ||||
Target Version | 1.2.11 | Fixed in Version | 1.2.11 | ||
Summary | 0007633: Saving an edited note should touch bug's last_updated timestamp | ||||
Description | Technically, this is an update. | ||||
Tags | No tags attached. | ||||
Attached Files | bugnote_api.php.diff (1,219 bytes)
--- mantisbt-1.2.8/core/bugnote_api.php 2011-09-06 15:23:10.000000000 +0100 +++ mantis/core/bugnote_api.php 2012-04-24 11:20:37.794674092 +0100 @@ -484,7 +484,7 @@ * @return bool * @access public */ -function bugnote_date_update( $p_bugnote_id ) { +function bugnote_date_update( $p_bugnote_id, $p_bug_update=false ) { $c_bugnote_id = db_prepare_int( $p_bugnote_id ); $t_bugnote_table = db_get_table( 'mantis_bugnote_table' ); @@ -493,6 +493,16 @@ WHERE id=" . db_param(); db_query_bound( $query, Array( db_now(), $c_bugnote_id ) ); + if ( $p_bug_update ) { + $t_bug_id = bugnote_get_field( $p_bugnote_id, 'bug_id' ); + $t_bug_table = db_get_table( 'mantis_bug_table' ); + + $query = "UPDATE $t_bug_table + SET last_updated=" . db_param() ." + WHERE id=" . db_param(); + db_query_bound( $query, Array( db_now(), $t_bug_id ) ); + } + # db_query errors if there was a problem so: return true; } @@ -527,7 +537,7 @@ db_query_bound( $query, Array( $p_bugnote_text, $t_bugnote_text_id ) ); # updated the last_updated date - bugnote_date_update( $p_bugnote_id ); + bugnote_date_update( $p_bugnote_id, true ); # insert a new revision $t_user_id = auth_get_current_user_id(); | ||||
I've fashioned a patch that works for us in 1.2.8 and applies to 1.2.10 without issue. Probably not the most elegant solution (I couldn't get bug_update_field() to work for some reason), but it's simple to understand and does the job. --- mantisbt-1.2.8/core/bugnote_api.php 2011-09-06 15:23:10.000000000 +0100
@@ -493,6 +493,16 @@
:edit: Added the patch file as an upload. |
|
By way of an FYI, I back-ported your fix and it works fine in 1.2.8. Many thanks, I knew there'd be a cleaner, more elegant solution. Just waiting for a release that includes this now. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master b55ecbb5 2012-04-25 01:53 Details Diff |
Update the bug's Last Update timestamp when editing a bugnote Fixes 0007633 |
Affected Issues 0007633 |
|
mod - core/bugnote_api.php | Diff File | ||
MantisBT: master-1.2.x 55f0779c 2012-04-25 01:53 Details Diff |
Update the bug's Last Update timestamp when editing a bugnote Fixes 0007633 |
Affected Issues 0007633 |
|
mod - core/bugnote_api.php | Diff File |