View Issue Details

IDProjectCategoryView StatusLast Update
0021935mantisbtfilterspublic2020-06-22 07:17
Reportercproensa Assigned Tocproensa  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3.3 
Target Version2.1.0Fixed in Version2.1.0 
Summary0021935: Filter api refactoring, manage stored filters
Description

This issue is to track the changes implemented in https://github.com/mantisbt/mantisbt/pull/862

The PR consists of a clean up of filter api, and preliminary implementation for a tool to edit stored filters.
The big part of the work is to refactor the filter system to allow code reuse.

This includes:

  • Define a specific filter array when dealing with most of filter api functions
    Previously, it was assuming that the only filter to manage by filter api is the "current" applied filter. This means changing a lot of logic from using the global $g_filter, into using a specific filter array passed as parameter.
    This allows operating on filter structures different than the "current" one.
  • Encapsulate filter manipulation logic.
    Previously, the logic reading a filter array from a submitted form was duplicated in several places: filter_api.php, view_all_set.php, view_filters_page.php.
    Create a unique point to perform parsing of a submitted filter form, and update/create a filter array from those values.
    Normalize the vaidation of filter arrays, with a more solid filter_ensure_valid_filter() and filter_get_default()
  • Generalize the presentation of a filter box UI, for any arbitrary filter.
    Allow this filterbox to be presented, submitted, and parsed for any specific filter, at different point of the application.

With the previous building blocks in place:

  • Create manage pages that can list details of existing stored filters, and allow editing existing ones.

As part of the rewrite:

  • Fix many bugs that were present in the filter system.
  • Create a new field to allow filtering by "last update date"
TagsNo tags attached.

Relationships

parent of 0021827 closedcommunity Displaying date filter values : month always displayed in text (english) 
parent of 0021032 closedcproensa Setting $g_filter_custom_fields_per_row to other than default can cause empty cells in filter box 
parent of 0021031 closedcproensa Rewrite the filter box form 
parent of 0008626 closedcproensa Filter forgets custom date filtering 
parent of 0006732 closedcproensa Sorting issue lists isn't stable (each sort scrambles previous sort) 
parent of 0007708 closedcproensa Feature: multiple sorting of problem informations 
parent of 0021592 closedcproensa Unknown column 'mantis_bug_table.tags' 
parent of 0020624 closedcproensa Filter shown inconsistent after changing from advanced to simple 
parent of 0021029 closedcproensa Trigering a DEPRECATED error from the page body fails 
parent of 0003803 closedcproensa Provide a way to update a saved filter 
parent of 0006551 closedcproensa Manage custom filters 
parent of 0020882 closedcproensa Filter by date inputs are shown disabled 
parent of 0021618 closedcproensa Duplicate code to determine the default view type 
parent of 0021814 closedcproensa plugin filter fields dont work with dynamic input 
parent of 0017852 closedcproensa Tags is showing on its own row in filter box 
parent of 0021811 closedcproensa Advanced filter shows icorrect fields 
parent of 0011007 closedcproensa After setting $g_view_filters = ADVANCED_ONLY in config_inc.php can still end up in simple filter mode. 
parent of 0006042 closedcproensa Switching to "Advanced Filters" hides "Hide Status" and ignores setting 
parent of 0020493 closedcproensa Wrong hide_status value on column sorting 
parent of 0021044 closedcproensa my view page, $t_hide_status_default consitency 
parent of 0006823 closedcommunity Date filter should work with "last update", too 
parent of 0009301 closedcproensa Add support for updating a current filter 
parent of 0009213 closedcproensa manage filter 
parent of 0019700 closedcproensa Filters table on the view_all_bug_page.php shows empty lines when $g_enable_profiles is set to OFF 
parent of 0018045 closedcproensa Changed ordering of fields on View Issues page 
related to 0023112 closedcproensa Custom fields badly filtered when multi-projects 
related to 0027056 closeddregad CVE-2020-16266: HTML injection (maybe XSS) via custom field on view_all_bug_page.php 

Activities

There are no notes attached to this issue.