View Issue Details

IDProjectCategoryView StatusLast Update
0006873mantisbtfilterspublic2013-12-13 10:22
Reportermoudsen Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version1.0.1 
Summary0006873: Filter "forgets" selected filter when returning to "View Issues" from issue
Description
  • Select a(ny) self-defined filter
  • Filters works fine (including switching to other projects)
  • Create a new issue / Work on an issue
  • When done: press "View Issues"
  • Filter is not selected automatically again (did in 0.19.x versions)
Additional Information

Please make the selected filter come back when returning with "View Issues" hyperlink. At this moment I have to reselect the filter again and again after each change.

TagsNo tags attached.

Activities

ecaplan

ecaplan

2006-06-15 12:11

reporter   ~0012964

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:

    $t_setting_arr['source_query_id'] = $f_source_query_id;

./core/filter_api.php (approximately around line 2028), changed to:

                                    $t_setting_arr = filter_deserialize( filter_db_get_filter( gpc_get_cookie( config_get( 'view_all_cookie' ), '' ) ) );
                                    $last_known_query_id = $t_setting_arr['source_query_id'];
                                    foreach( $t_stored_queries_arr as $t_query_id => $t_query_name ) {
                                            PRINT '<option value="' . $t_query_id . '" ' . ($t_query_id == $last_known_query_id ? "selected" : "") . '>' . $t_query_name . '</option>';
                                    }

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.

Eddie

ecaplan

ecaplan

2006-06-15 12:31

reporter   ~0012966

Same issue as 0006491 and 0006873. 0006491 has the best discussion of issue.

atrol

atrol

2013-12-01 07:09

developer   ~0038672

This issue is not reproducible with the current version of MantisBT.

We recommend that you upgrade to the latest stable version [1]; if after doing so the problem persists, do not hesitate to reopen the issue, with additional relevant information.

[1] https://sourceforge.net/projects/mantisbt/files/mantis-stable/