Add "OR IS NULL" option to views filter of type Group

Created on 1 May 2023, over 1 year ago
Updated 16 July 2024, 5 months ago

Problem/Motivation

The views filter of group type when being exposed and using either a "Is not equal to" or "Does not contain" operator, items that are NULL will not match and therefore will not be included in the results. Their should be a way for users to include results with a NULL value because they could be considered as results that do not equal/contain a given value.

The problem is using 'anything' NOT LIKE null returns null (not true). And only true qualifies for filter expressions in a WHERE clause (see here).

Steps to reproduce

Proposed resolution

Follow a similar approach to the D7 issue #411376: Add "OR IS NULL" as an option to views_handler_filter_numeric β†’

Remaining tasks

Add a test

User interface changes

Added a checkbox to enable/disable this feature when configuring a views Grouped filter (see image β†’ )

API changes

None

Data model changes

None

Release notes snippet

n/a

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 23 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom hga77

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024