Skip to content

Fix filters

Maaike Visser requested to merge fix_filters into development

Note: this MR relies on !88 (merged) .

What was the problem

If a user selected a number of filters on the select page and then limited the number of items shown or vice versa, the other filters would be removed. The same happened when going to the next page.

What caused the behaviour

The filter and the number of pages were each contained in their own form. Clicking submit on the respective form would send only the information of the form the submit button was contained in (expected behavior). The parameters were supposed to be stored in SessionParameters, but these were not accurately updated and queried.

How was the problem solved

A number of conditions were added based on which the SessionParameters are updated. An additional problem was that it is not possible to store multiple values in RedirectAttributes, as they are squashed into a single string. A hacky workaround for this is provided.

Merge request reports