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

Created on 1 May 2023, about 2 years 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

9.5

Component
Views 

Last updated about 24 hours ago

Created by

🇬🇧United Kingdom harcher

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

Comments & Activities

Production build 0.71.5 2024