Clean up empty and exception argument values

Created on 27 January 2023, over 1 year ago

Problem

a) If exception value (e.g. all) of an argument is provided in URL, it is written to DB, and if "Pass Contextual Filters" option is used it uses other ordering compared to page without arguments, but generally it is the same list of items and same page.
b) If view arguments uses default value (e.g. from query), exception value for each argument is written to DB when arguments aren't set. In this way when one more argument is added to the view (or exceptions value is changes), ordering on the main page without arguments is lost.

Proposed solution

Process exception value as empty (NULL) and tail empty values from arguments list, written to DB.

Benefits

- Same page on different URLs "/view-page/" and "/view-page/all" shows same ordering.
- New argument could be added without ordering loss for previous argument values.
- An argument exception value could be changed without ordering loss.

User interface changes

No

API changes

No

Data model changes

In "args" DB column only active arguments are kept now. Exception values that goes before real values are kept as null, and trailing ones are ignored.

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡§πŸ‡ΎBelarus dewalt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024