diff -r -u mantis.org/billing_inc.php mantis/billing_inc.php
--- mantis.org/billing_inc.php	2008-05-22 04:50:55.000000000 +0200
+++ mantis/billing_inc.php	2009-08-03 14:11:25.000000000 +0200
@@ -65,6 +65,14 @@
 	$t_bugnote_stats_to_y = gpc_get_int('end_year', $t_bugnote_stats_to_def_y);
 
 	$f_get_bugnote_stats_button = gpc_get_string('get_bugnote_stats_button', '');
+	if ( access_has_project_level( config_get( 'time_tracking_reporting_select_reporter_threshold' ) ) ) {
+		$t_select_reporter = true;
+		$f_reporter_id = gpc_get_int( 'reporter_id', ALL_USERS );
+	}
+	else {
+		$t_select_reporter = false;
+		$f_reporter_id = auth_get_current_user_id();
+	}
 	$f_bugnote_cost = gpc_get_int( 'bugnote_cost', '' );
 	$f_project_id = helper_get_current_project();
 
@@ -77,17 +85,20 @@
 ?>
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
 <input type="hidden" name="id" value="<?php echo isset( $f_bug_id ) ? $f_bug_id : 0 ?>" />
-<table border="0" class="width100" cellspacing="0">
+<table align="center" class="width75" cellspacing="1">
 <tr>
-	<td class="form-title" colspan="4">
+	<td class="form-title" colspan="2">
 <?php
 		collapse_icon( 'bugnotestats' );
 ?>
 		<?php echo lang_get( 'time_tracking' ) ?>
 	</td>
 </tr>
-<tr class="row-2">
-        <td class="category" width="25%">
+<tr <?php echo helper_alternate_class() ?>>
+        <td class="category" width="20%">
+		<?php echo lang_get( 'time_tracking_period' ) ?>
+	</td>
+	<td>
                 <?php
 		$t_filter = array();
 		$t_filter['do_filter_by_date'] = 'on';
@@ -101,11 +112,26 @@
 		?>
         </td>
 </tr>
+<?php if ( $t_select_reporter ) { ?>
+<tr <?php echo helper_alternate_class() ?>>
+	<td class="category">
+		<?php echo lang_get( 'username' ) ?>
+	</td>
+	<td>
+		<select <?php echo helper_get_tab_index() ?> name="reporter_id">
+			<option value="0" selected="selected"></option>
+			<?php print_reporter_option_list( $f_reporter_id, $f_project_id ) ?>
+		</select>
+	</td>
+</tr>
+<?php } ?>
 <?php if ( $t_cost_col ) { ?>
-<tr class="row-1">
+<tr <?php echo helper_alternate_class() ?>>
+	<td class="category">
+		<?php echo lang_get( 'time_tracking_cost' ) ?>
+	</td>
 	<td>
-		<?php echo lang_get( 'time_tracking_cost' ) ?>:
-		<input type="text" name="bugnote_cost" value="<?php echo $f_bugnote_cost ?>" />
+		<input type="text" <?php echo helper_get_tab_index() ?> name="bugnote_cost" value="<?php echo $f_bugnote_cost ?>" />
 	</td>
 </tr>
 <?php } ?>
@@ -121,7 +147,7 @@
 if ( !is_blank( $f_get_bugnote_stats_button ) ) {
 	$t_from = "$t_bugnote_stats_from_y-$t_bugnote_stats_from_m-$t_bugnote_stats_from_d";
 	$t_to = "$t_bugnote_stats_to_y-$t_bugnote_stats_to_m-$t_bugnote_stats_to_d";
-	$t_bugnote_stats = bugnote_stats_get_project_array( $f_project_id, $t_from, $t_to, $f_bugnote_cost );
+	$t_bugnote_stats = bugnote_stats_get_project_array( $f_project_id, $t_from, $t_to, $f_bugnote_cost, $f_reporter_id );
 
 	if ( is_blank( $f_bugnote_cost ) || ( (double)$f_bugnote_cost == 0 ) ) {
 		$t_cost_col = false;
diff -r -u mantis.org/config_defaults_inc.php mantis/config_defaults_inc.php
--- mantis.org/config_defaults_inc.php	2009-07-02 16:50:54.000000000 +0200
+++ mantis/config_defaults_inc.php	2009-08-03 14:11:25.000000000 +0200
@@ -1914,6 +1914,9 @@
 	# access level required to run reports
 	$g_time_tracking_reporting_threshold = DEVELOPER;
 
+	# access level required to select reporter when running reports
+	$g_time_tracking_reporting_select_reporter_threshold = MANAGER;
+
 	#allow time tracking to be recorded without a bugnote
 	$g_time_tracking_without_note = ON;
 
diff -r -u mantis.org/core/bugnote_api.php mantis/core/bugnote_api.php
--- mantis.org/core/bugnote_api.php	2008-07-13 00:23:36.000000000 +0200
+++ mantis/core/bugnote_api.php	2009-08-03 14:11:25.000000000 +0200
@@ -525,10 +525,11 @@
 	# Returns an array of bugnote stats
 	# $p_from - Starting date (yyyy-mm-dd) inclusive, if blank, then ignored.
 	# $p_to - Ending date (yyyy-mm-dd) inclusive, if blank, then ignored.
-	function bugnote_stats_get_project_array( $p_project_id, $p_from, $p_to, $p_cost ) {
+	function bugnote_stats_get_project_array( $p_project_id, $p_from, $p_to, $p_cost, $p_reporter_id = ALL_USERS ) {
 		$c_project_id = db_prepare_int( $p_project_id );
 		$c_to = db_prepare_date( $p_to );
 		$c_from = db_prepare_date( $p_from );
+		$c_reporter_id = db_prepare_int( $p_reporter_id );
 		$c_cost = db_prepare_double( $p_cost );
 
 		// MySQL
@@ -549,17 +550,23 @@
 		}
 
 		if ( ALL_PROJECTS != $c_project_id ) {
-			$t_project_where = " AND b.project_id = '$c_project_id' AND bn.bug_id = b.id ";
+			$t_project_where = " AND b.project_id = '$c_project_id' AND bn.bug_id = b.id";
 		} else {
 			$t_project_where = '';
 		}
 
+		if ( ALL_USERS != $c_reporter_id ) {
+			$t_reporter_where = " AND bn.reporter_id = '$c_reporter_id'";
+		} else {
+			$t_reporter_where = '';
+		}
+
 		$t_results = array();
 
 		$query = "SELECT username, summary, bn.bug_id, SUM(time_tracking) AS sum_time_tracking
 			FROM $t_user_table u, $t_bugnote_table bn, $t_bug_table b
 			WHERE u.id = bn.reporter_id AND bn.time_tracking != 0 AND bn.bug_id = b.id
-			$t_project_where $t_from_where $t_to_where
+			$t_project_where $t_from_where $t_to_where $t_reporter_where
 			GROUP BY bn.bug_id, u.id, u.username, b.summary
 			ORDER BY bn.bug_id";
 
diff -r -u mantis.org/lang/strings_german_8859-1.txt mantis/lang/strings_german_8859-1.txt
--- mantis.org/lang/strings_german_8859-1.txt	2007-10-19 09:07:18.000000000 +0200
+++ mantis/lang/strings_german_8859-1.txt	2009-08-03 14:11:25.000000000 +0200
@@ -1412,6 +1412,7 @@
 $s_time_tracking_get_info_button = 'Zeiterfassungs-Informationen abfragen';
 $s_time_tracking_cost_per_hour = 'Kosten / Stunde';
 $s_time_tracking_cost = 'Kosten';
+$s_time_tracking_period = 'Zeitraum';
 $s_total_time_for_issue = 'Gesamtzeit für den Eintrag = %s';
 $s_from_date = 'Von';
 $s_to_date = 'Bis';
diff -r -u mantis.org/lang/strings_german_eintrag.txt mantis/lang/strings_german_eintrag.txt
--- mantis.org/lang/strings_german_eintrag.txt	2007-10-19 09:07:18.000000000 +0200
+++ mantis/lang/strings_german_eintrag.txt	2009-08-03 14:11:25.000000000 +0200
@@ -1413,6 +1413,7 @@
 $s_time_tracking_get_info_button = 'Zeiterfassungs-Informationen abfragen';
 $s_time_tracking_cost_per_hour = 'Kosten / Stunde';
 $s_time_tracking_cost = 'Kosten';
+$s_time_tracking_period = 'Zeitraum';
 $s_total_time_for_issue = 'Gesamtzeit fÃ¼r den Eintrag = %s';
 $s_from_date = 'Von';
 $s_to_date = 'Bis';
diff -r -u mantis.org/lang/strings_german.txt mantis/lang/strings_german.txt
--- mantis.org/lang/strings_german.txt	2007-10-19 09:07:18.000000000 +0200
+++ mantis/lang/strings_german.txt	2009-08-03 14:11:25.000000000 +0200
@@ -1412,6 +1412,7 @@
 $s_time_tracking_get_info_button = 'Zeiterfassungs-Informationen abfragen';
 $s_time_tracking_cost_per_hour = 'Kosten / Stunde';
 $s_time_tracking_cost = 'Kosten';
+$s_time_tracking_period = 'Zeitraum';
 $s_total_time_for_issue = 'Gesamtzeit fÃ¼r den Eintrag = %s';
 $s_from_date = 'Von';
 $s_to_date = 'Bis';
