Comparison not works properly if field is empty ?

Created on 6 December 2022, almost 2 years ago
Updated 19 July 2024, 4 months ago

My user have 2 fields; 1 that they can modify and the other hidden that contain copy of the value of the first one when a specific action is done.
It's use to perform specific action when the field is modified in a cron task.

I would like to use this module for a view to select all user that have different value in the 2 fields. but when one of the field is empty the user is not present in the view.

I perform a work around with 2 OR clause in the filter (field 1 empty and field 2 not empty + field 1 not empty and field 2 empty). But I think that it's a bug No ??

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇧🇪Belgium spols

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.

  • 🇳🇿New Zealand jlscott

    I think that if one of the fields is empty then you need to decide whether that result should be included or excluded. Views itself provides the ability to have a separate filter group to allow such scenarios to be implemented. It would be just repeating the core views functionality to implement your request, so sorry, but I will close this without changing anything.

Production build 0.71.5 2024