Null/Empty value handling inconsistent across modules #4952

Open
opened 2026-02-20 16:26:49 -05:00 by deekerman · 0 comments
Owner

Originally created by @simonr44 on GitHub (Feb 9, 2023).

Issue

When comparing empty and null strings, the current handling of this is inconsistent between Reports and AOW_Workflows

Reports:
Checks if a value is empty or null during an "equal to" empty string value.
Checks if a value is empty during a "not equal to" empty string value.

Workflows:
Checks if a value is empty during an "equal to" empty string value.
Checks if a value is empty during a "not equal to" empty string value.

Expected Behavior

The handling of empty and null values should be consistent across these modules.
As a null value could easily be interpreted by a user as empty, null could be checked at the same time in both types and modules.

Actual Behavior

Null is considered empty in one of the four situations.

Possible Fix

Check for empty or null on all four situations. Merge request to follow.

Steps to Reproduce

  1. Create a report which checks against a nullable field with empty values
  2. Behaviour will be inconsistent between "equal to" and "not equal to" across the two modules discussed.

Context

Records returned between these two modules are different with the same conditions

Your Environment

  • SuiteCRM Version used: 7.13.1
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome
  • Environment name and version (e.g. MySQL, PHP 7): PHP7.4, MariaDB
  • Operating System and version (e.g Ubuntu 16.04): Debian 11
Originally created by @simonr44 on GitHub (Feb 9, 2023). #### Issue When comparing empty and null strings, the current handling of this is inconsistent between `Reports` and `AOW_Workflows` Reports: Checks if a value is empty or null during an "equal to" empty string value. Checks if a value is empty during a "not equal to" empty string value. Workflows: Checks if a value is empty during an "equal to" empty string value. Checks if a value is empty during a "not equal to" empty string value. #### Expected Behavior The handling of empty and null values should be consistent across these modules. As a null value could easily be interpreted by a user as empty, null could be checked at the same time in both types and modules. #### Actual Behavior Null is considered empty in one of the four situations. #### Possible Fix Check for empty or null on all four situations. Merge request to follow. #### Steps to Reproduce 1. Create a report which checks against a nullable field with empty values 2. Behaviour will be inconsistent between "equal to" and "not equal to" across the two modules discussed. #### Context Records returned between these two modules are different with the same conditions #### Your Environment * SuiteCRM Version used: 7.13.1 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome * Environment name and version (e.g. MySQL, PHP 7): PHP7.4, MariaDB * Operating System and version (e.g Ubuntu 16.04): Debian 11
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4952
No description provided.