View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006491 | mantisbt | filters | public | 2005-12-12 05:31 | 2014-09-23 18:05 |
Reporter | image | Assigned To | daryn | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.0.0rc3 | ||||
Target Version | 1.2.12 | Fixed in Version | 1.2.12 | ||
Summary | 0006491: After applying a filter, the name of the applied filter is replaced by [Reset filter], which leads to misinterpretation | ||||
Description | The saved filter you apply is correctly taken over by the filter settings. Then the filter selection field is already prepared to go the [Reset filter] selection. It would be more logical to leave the selected filter. Otherwise most users can not clearly see what (if any) filter is currently applied in the overview. Of course they can see it in the filter selections fields, but the filtername shows it in one view. | ||||
Tags | No tags attached. | ||||
This is the most requested Mantis enhancement in my organization - PLEASE fix. Thanks! |
|
I agree that this would be useful, so I tried to get in there and figure it out. That filter api code is brutal to sift through though. Wow. If one of the developers knows how to access the current filter's id from the filter_draw_selection_area2 function this would be a simple matter. Here is an example of what the code might look like (using $t_current_filter_id to represent the current filter's id...duh). ./core/filter_api.php:2028 foreach( $t_stored_queries_arr as $t_query_id => $t_query_name ) { I couldn't figure out how to access that variable so I wrote a disgusting workaround that still has some issues but works most of the time. Looking forward to a fix or this. |
|
I agree that this would be a great to fix. However, we need to clarify one thing:
What should happen to the filter name? The options are:
I think using [chosen filter name]* is the better option. P.S. I agree that filter code is the most complex and hardest to maintain in Mantis. That's why I don't touch it :) |
|
Or a third option: Change the dropdown name to placeholder for temporary filters that could read [Unsaved Filter], or [New Filter], or something similar. If the filter is checked at each load or manual option change (which I think it is), this would work. Example Scenario: User selects "filter1", dropdown shows "filter1" after applying the filter. I just think the more expected function of selecting a filter and then changing options would be to add a new filter rather than updating the selected filter. At least for me, since my filter names are based on the criteria and changing the criteria would mean changing the name which might as well be a whole new filter. |
|
vboctor's solution is closest to what the users here would like to see. Besides wanting to see which filter is currently selected, they also want to be able to modify existing filters. So if a user loads a filter and changes some of the criteria, he/she would also want to save the changes to that filter. There's always the option of selecting [Reset Filter] in order to create an entirely new one. As for a workaround, I've seen that the code in view_all_set.php gets the selection from the filter list drop-down near the top in the line I see that there are other issues involved that I hadn't considered. So since I can't be of much help development-wise, you have my sponsorship. |
|
EDIT: FYI, my version is 1.0.2 and that is what my line numbers are based off of Here is the hacky-code that I added to filter_api.php to replace the foreach at line number 2027-2031. It has issues though and is not suggested for production/critical systems. As I said previously I would prefer to track down a way to pass the filter id into the function instead but as a temporary ugly hack to get some of the needed functionality, use at your own risk. Brief description of the process: Shortcomings (to name a few): <?php if ( !is_numeric( $t_current_filter_id ) ) { foreach( $t_stored_queries_arr as $t_query_id => $t_query_name ) { |
|
I fixed this in my local copy of Mantis (well, UMantis actually) by adding "source_query_id" to the filter_string whenever a filter is selected. Then when the filter-selection menu is displayed, the OPTION values are compared and the "selected" value is set. I made the following two changes: ./view_all_set.php (approximatly around line 433), inserted:
./core/filter_api.php (approximately around line 2028), changed to:
To be sure, I'm an Mantis novice and there may be a better way of doing this. But it seems to be working for me. I also wrote this before I found this discussion, so it does not address the issues of the user modifying the filter but still showing the old filter name. However, I think it is better than nothing. Eddie |
|
Filter dropdown now displays the name of the active filter. When modifications are made to the filter they are highlighted to indicate that the selections do not match the stored filter. |
|
As this was also an issue in 1.2.x for which several users requested a fix, I backported daryn's changes as well as dhx's subsequent improvement. Updating target/fixed in version accordingly. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 971d134f 2010-05-10 23:39 Details Diff |
Fix 0006491, Fix 0006700. Display current filter in the stored query dropdown. Add jquery library, add noConflict call to allow jquery to coexist with projax. Add bugFilter.js to highlight changes to a stored filter. |
Affected Issues 0006491, 0006700 |
|
mod - css/default.css | Diff File | ||
add - javascript/dev/bugFilter.js | Diff File | ||
mod - core/html_api.php | Diff File | ||
add - javascript/min/bugFilter.js | Diff File | ||
add - javascript/min/jquery-min.js | Diff File | ||
mod - core/filter_api.php | Diff File | ||
mod - view_all_bug_page.php | Diff File | ||
mod - view_all_set.php | Diff File | ||
add - javascript/dev/jquery-1.4.2.js | Diff File | ||
MantisBT: master-1.2.x c8ef2d77 2012-08-26 10:31 Details Diff |
Display currently active filter in view issues page Previously, the filter selection dropdown would always change back to '[Reset Filter]' after picking an entry from the list. This is a backport of several commits from master branch. - 971d134f660ef9874888bfd1176e15cfdf0ab102 (issue 0006491) - 3110481c6492ffcb9b3f2f6886897508db4ed1aa - 269c843a95fbf1b34f1e5e1a24e969cee7e47280 |
Affected Issues 0006491 |
|
mod - core/filter_api.php | Diff File | ||
mod - view_all_set.php | Diff File |