Skip to content

Commit

Permalink
Include project info in billing page
Browse files Browse the repository at this point in the history
When 'All Projects' is selected, include the project name for each issue.

Fixes #20523
  • Loading branch information
vboctor committed Jan 17, 2016
1 parent a21eb8c commit 951e6b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion billing_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@

$t_item['sum_time_tracking'] = db_minutes_to_hhmm( $t_item['sum_time_tracking'] );
if( $t_item['bug_id'] != $t_prev_id ) {
$t_link = sprintf( lang_get( 'label' ), string_get_bug_view_link( $t_item['bug_id'] ) ) . lang_get( 'word_separator' ) . string_display( $t_item['summary'] );
$t_project_info = ( !isset( $f_bug_id ) && $f_project_id == ALL_PROJECTS ) ? '[' . project_get_name( $t_item['project_id'] ) . ']' . lang_get( 'word_separator' ) : '';
$t_link = sprintf( lang_get( 'label' ), string_get_bug_view_link( $t_item['bug_id'] ) ) . lang_get( 'word_separator' ) . $t_project_info . string_display( $t_item['summary'] );
echo '<tr class="row-category-history"><td colspan="4">' . $t_link . '</td></tr>';
$t_prev_id = $t_item['bug_id'];
}
Expand Down
2 changes: 1 addition & 1 deletion core/bugnote_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ function bugnote_stats_get_project_array( $p_project_id, $p_from, $p_to, $p_cost

$t_results = array();

$t_query = 'SELECT username, realname, summary, bn.bug_id, SUM(time_tracking) AS sum_time_tracking
$t_query = 'SELECT username, realname, summary, b.project_id project_id, bn.bug_id, SUM(time_tracking) AS sum_time_tracking
FROM {user} u, {bugnote} bn, {bug} 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 . '
Expand Down

0 comments on commit 951e6b9

Please sign in to comment.