diff -r 04bb28dd6964 core/bug_api.php
--- a/core/bug_api.php Fri Sep 25 20:11:21 2009 +0200
+++ b/core/bug_api.php Sat Sep 26 06:15:09 2009 +0200
@@ -1309,6 +1309,34 @@
}
/**
+ * return the reporter (user_id) for the most recent time at which a bugnote
+ * associated with the bug was modified
+ * @param int p_bug_id integer representing bug id
+ * @return bool|int false or user id in integer format representing newest bugnote reporter
+ * @access public
+ * @uses database_api.php
+ */
+function bug_get_newest_bugnote_reporter( $p_bug_id ) {
+ $c_bug_id = db_prepare_int( $p_bug_id );
+ $t_bugnote_table = db_get_table( 'mantis_bugnote_table' );
+
+ $query = "SELECT MIN(reporter_id)
+ FROM $t_bugnote_table A
+ WHERE A.date_submitted = (SELECT MIN(X.date_submitted)
+ FROM $t_bugnote_table X
+ WHERE X.bug_id = A.bug_id) AND
+ A.bug_id=" . db_param();
+ $result = db_query_bound( $query, Array( $c_bug_id ), 1 );
+ $row = db_result( $result );
+
+ if( false === $row ) {
+ return false;
+ } else {
+ return $row;
+ }
+}
+
+/**
* return the timestamp for the most recent time at which a bugnote
* associated with the bug was modified and the total bugnote
* count in one db query
diff -r 04bb28dd6964 my_view_inc.php
--- a/my_view_inc.php Fri Sep 25 20:11:21 2009 +0200
+++ b/my_view_inc.php Sat Sep 26 06:15:09 2009 +0200
@@ -442,6 +442,9 @@
$t_summary = string_display_line_links( $t_bug->summary );
$t_last_updated = date( config_get( 'normal_date_format' ), $t_bug->last_updated );
+ $t_last_reporter_id = bug_get_newest_bugnote_reporter( $t_bug->id );
+ $t_last_reporter = $t_last_reporter_id ? user_get_name( $t_last_reporter_id ) : '';
+
# choose color based on status
$status_color = get_status_color( $t_bug->status );
@@ -506,9 +509,9 @@
echo string_display_line( category_full_name( $t_bug->category_id, true, $t_bug->project_id ) );
if( $t_bug->last_updated > strtotime( '-' . $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] . ' hours' ) ) {
- echo ' - ' . $t_last_updated . '';
+ echo ' - ' . $t_last_updated . ' - ' . $t_last_reporter . '';
} else {
- echo ' - ' . $t_last_updated;
+ echo ' - ' . $t_last_updated . ' - ' . $t_last_reporter;
}
?>