Skip to content

Commit

Permalink
Fix resolved/closed links for summary by status
Browse files Browse the repository at this point in the history
When using custom statuses higher than bug_resolved_status_threshold,
the filter links for figures in the Summary page's "By Status" report
are incorrect for the Resolved and Closed columns.

This is caused by summary_print_by_enum() adding an extra 'status'
query parameter set to bug_resolved_status_threshold /
bug_closed_status_threshold (depending on the column being processed),
which overrides the status set for the row.

The code now skips adding the 'status' query parameter when processing
the Status enum, and only does it when processing other enums.

Fixes #23796
  • Loading branch information
dregad committed Jan 24, 2018
1 parent 270d408 commit 51e159c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/summary_api.php
Expand Up @@ -255,7 +255,8 @@ function summary_print_by_enum( $p_enum ) {
}
if( 0 < $t_bugs_resolved ) {
$t_bugs_resolved = $t_bug_link
. '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_resolved_val
# Only add status filter if not already part of the link
. ( 'status' != $p_enum ? '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_resolved_val : '' )
. '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . $t_closed_val . '">'
. $t_bugs_resolved . '</a>';
} else {
Expand All @@ -265,7 +266,8 @@ function summary_print_by_enum( $p_enum ) {
}
if( 0 < $t_bugs_closed ) {
$t_bugs_closed = $t_bug_link
. '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_closed_val
# Only add status filter if not already part of the link
. ( 'status' != $p_enum ? '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_closed_val : '' )
. '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . META_FILTER_NONE . '">'
. $t_bugs_closed . '</a>';
} else {
Expand Down

0 comments on commit 51e159c

Please sign in to comment.