Permalink
Browse files

Fix resolved/closed links for summary by status

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 21, 2018
1 parent 270d408 commit 51e159c42b19dbbf50e8b1485c2d5343dda42b9e
Showing with 4 additions and 2 deletions.
  1. +4 −2 core/summary_api.php
@@ -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 {
@@ -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 {

0 comments on commit 51e159c

Please sign in to comment.