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

Created on 1 May 2023, about 1 year ago
Updated 21 June 2024, 8 days 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 8 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.69.0 2024