Optionally consider empty values when evaluating uniqueness

Created on 14 April 2010, over 14 years ago
Updated 18 April 2024, 8 months ago

The issue #225887: Null field is not unique β†’ introduced a "fix" which meant you could not compare empty values. However there are a number of use cases where this might be desirable.

For example, say you have a database of people with uniqueness based on names and telephone number. On the one phone number there's John Smith, and his son John Smith Jr. If you have 'field_first_name', 'field_last_name', 'field_name_suffix', and 'field_phone' determining uniqueness, John Smith Jr. will not be considered the same person as John Smith, but John Smith will never be considered the same person as John Smith because the current code says "nope, no value for field_name_suffix, nothing can match".

So in some cases, considering empty values is desirable, in others not. The attached patch makes this an option on a per-content-type basis.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia Matthew Davidson

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.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I'm closing it because the issue was created a long time ago without any further steps.

    if you still need it then raise a new one.
    thanks

Production build 0.71.5 2024