View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007738 | mantisbt | other | public | 2007-01-25 11:45 | 2010-08-30 06:06 |
Reporter | nrzz84 | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 1.0.6 | ||||
Summary | 0007738: Filter Links in Summary Page incorrect with Custom Status | ||||
Description | My assumption with this bug is that the "Resolved" column means issues that are not "Open" and not "Closed" as oppposed to the state "Resolved" I've added some additional states to the workflow. In the summary page, under "by status" The links to the filter page return bugs that are in the resolved state rather than the custom state defined by the row. Also if you look at the hyperlink generated, you will see something like Notice that show_status appears twice and overrides the actual value we want to see. Also in other resolved columns in other sections of the summary page, it will report, for example, 4 bugs, but the after clicking the link, it will take me to the filter page with only 1 bug which has the status "resolved". | ||||
Additional Information | After digging into the code, core/summary_api.php. I've noticed that some functions use the RESOLVED constant as opposed to the config "bug_resolved_status_threshold" variable. After playing with the code for a bit it I've managed to produce the desired outcome with one excpetion, the resolved column hyperlink shows issue which are open and not resolved. At this point, the easiest solution seems to be to introduce a filter which operates like the hide filter but hides status below the spefied one. That way I can hide the open bugs from the view that is generated. See patch file for my changes. | ||||
Tags | No tags attached. | ||||
Attached Files | summary.patch (2,663 bytes)
Index: C:/Documents and Settings/nrizzuti/Desktop/repo3-working/summary_api.php =================================================================== --- C:/Documents and Settings/nrizzuti/Desktop/repo3-working/summary_api.php (revision 16) +++ C:/Documents and Settings/nrizzuti/Desktop/repo3-working/summary_api.php (revision 17) @@ -79,14 +79,20 @@ if ( !is_blank( $t_bug_link ) ) { if ( 0 < $t_bugs_open ) { - $t_bugs_open = $t_bug_link . '&hide_status=' . RESOLVED . '">' . $t_bugs_open . '</a>'; + $t_bugs_open = $t_bug_link . '&hide_status=' . t_resolved_val . '">' . $t_bugs_open . '</a>'; } else { if ( ( 'status' == $p_enum ) && ( $t_last_value >= $t_resolved_val ) ) { $t_bugs_open = '-'; } } if ( 0 < $t_bugs_resolved ) { - $t_bugs_resolved = $t_bug_link . '&show_status=' . RESOLVED . '&hide_status=' . CLOSED . '">' . $t_bugs_resolved . '</a>'; + switch ( $p_enum ) { + case 'status': + $t_bugs_resolved = $t_bug_link . '&hide_status=' . CLOSED . '">' . $t_bugs_resolved . '</a>'; + break; + default: + $t_bugs_resolved = $t_bug_link . '&show_status=' . t_resolved_val . '&hide_status=' . CLOSED . '">' . $t_bugs_resolved . '</a>'; + } } else { if ( ( 'status' == $p_enum ) && ( ( $t_last_value < $t_resolved_val ) || ( $t_last_value >= $t_closed_val ) ) ) { $t_bugs_resolved = '-'; @@ -405,8 +411,10 @@ $t_bugs_resolved = 0; $t_bugs_closed = 0; $t_bugs_total = 0; - - $t_resolved_val = RESOLVED; + + $my_resolved_thresh = config_get('bug_resolved_status_threshold'); + + $t_resolved_val = $my_resolved_thresh; $t_closed_val = CLOSED; while ( $row = db_fetch_array( $result ) ) { @@ -420,10 +428,10 @@ $t_bug_link = '<a class="subtle" href="' . config_get( 'bug_count_hyperlink_prefix' ) . '&show_category=' . $last_category; if ( 0 < $t_bugs_open ) { - $t_bugs_open = $t_bug_link . '&hide_status=' . RESOLVED . '">' . $t_bugs_open . '</a>'; + $t_bugs_open = $t_bug_link . '&hide_status=' . $my_resolved_thresh . '">' . $t_bugs_open . '</a>'; } if ( 0 < $t_bugs_resolved ) { - $t_bugs_resolved = $t_bug_link . '&show_status=' . RESOLVED . '&hide_status=' . CLOSED . '">' . $t_bugs_resolved . '</a>'; + $t_bugs_resolved = $t_bug_link . '&hide_status=' . CLOSED . '">' . $t_bugs_resolved . '</a>'; } if ( 0 < $t_bugs_closed ) { $t_bugs_closed = $t_bug_link . '&show_status=' . CLOSED . '&hide_status=">' . $t_bugs_closed . '</a>'; | ||||