View Issue Details

IDProjectCategoryView StatusLast Update
0022392mantisbtfilterspublic2017-04-01 00:13
ReporterViishAssigned Tocproensa 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.1.0 
Target Version2.2.3Fixed in Version2.2.3 
Summary0022392: Sorting all bugs list using a column header after applying a filter resets the filter
Description

When I go to the all bugs list view, I filter them using either a previously saved filter or by chossing among the options at the top of the page, filter is applied.
Then I want to sort the filtered results by summary (for example, every column does this), I click on the summary column header, the page refreshes and ALL the results are now sorted by summary, even those who shouldn't be there because of the filter.
If I re-apply the filter, I have the result I want.

Steps To Reproduce
  • Go to view_all_bug_page.php page ;
  • Apply a filter ;
  • Sort the filtered results using any column header ;
  • The results are no longer filtered but are correctly sorted.
TagsNo tags attached.

Relationships

related to 0022555 closedcproensa Regression in custom field sorting 

Activities

atrol

atrol

2017-02-16 14:45

developer   ~0055705

I am not able to reproduce the issue using the given information.
I assume this one 0008204 is what you mean . Right?

Viish

Viish

2017-02-17 07:51

reporter   ~0055717

I tried a few things and it turns out the problem only happens when I use a custom field as filter.
In our Mantis, we have a custom field named customer_projects we set to yes, and a filter that only displays issues that belongs to a customer project (custom field customer_project set to Yes).
After applying this filter, if I sort the results using the columns headers, the filter is no longer set.
If I filter using one of the native filter fields (like Assigned to), I don't have the problem.

Viish

Viish

2017-02-21 04:21

reporter   ~0055729

Did you manage to reproduce it ?

Chris_Z

Chris_Z

2017-02-21 12:40

reporter   ~0055731

If this may be any consolation for you, I at least see exactlty the same.

As soon as Custom Field is set to filter anything in Filters, then do Apply Filter, then click on any column heading in the resulting list this Custom Field will reset itself to [any].

It must be a bug.

sebastian.poxhofer

sebastian.poxhofer

2017-03-09 11:14

reporter   ~0056021

I can confirm this bug.
It seems that the filter settings for custom fields of $t_filter, in filter_api.php#filter_gpc_get(), are not copied to $t_filter_input.

cproensa

cproensa

2017-03-21 18:55

developer   ~0056148

PR: https://github.com/mantisbt/mantisbt/pull/1059

@sebastian.poxhofer

It seems that the filter settings for custom fields of $t_filter, in filter_api.php#filter_gpc_get(), are not copied to $t_filter_input.

Thanks! that was the problem

Related Changesets

MantisBT: master-2.2 a55495f7

2017-03-21 18:43:52

cproensa


Committer: vboctor Details Diff
Fix filter_gpc_get custom fields filter properties

Fix issue where filter_gpc_get() parses custom fields properties and
overwrites existing ones in the input filter with empty when those
properties are not present as gpc parameters.
This function, when called with an existing filter, should overwrite
only those properties thare are present as request parameters.

Fixes: 0022392
mod - core/filter_api.php Diff File

Issue History

Date Modified Username Field Change
2017-02-16 11:46 Viish New Issue
2017-02-16 14:45 atrol Status new => feedback
2017-02-16 14:45 atrol Note Added: 0055705
2017-02-17 07:51 Viish Note Added: 0055717
2017-02-17 07:51 Viish Status feedback => new
2017-02-21 04:21 Viish Note Added: 0055729
2017-02-21 12:40 Chris_Z Note Added: 0055731
2017-03-09 11:14 sebastian.poxhofer Note Added: 0056021
2017-03-09 12:02 atrol Severity feature => minor
2017-03-09 12:02 atrol Category bugtracker => filters
2017-03-21 03:50 atrol Relationship added related to 0022555
2017-03-21 18:44 cproensa Assigned To => cproensa
2017-03-21 18:44 cproensa Status new => assigned
2017-03-21 18:55 cproensa Note Added: 0056148
2017-03-22 03:39 atrol Target Version => 2.3.0
2017-03-22 22:33 vboctor Changeset attached => MantisBT master-2.2 a55495f7
2017-03-22 22:33 cproensa Status assigned => resolved
2017-03-22 22:33 cproensa Resolution open => fixed
2017-03-22 22:33 cproensa Fixed in Version => 2.2.3
2017-03-22 23:17 vboctor Target Version 2.3.0 => 2.2.3
2017-04-01 00:13 vboctoradmin Status resolved => closed