salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.29k stars 2.04k forks source link

"Is null" condition does not work on workflows conditions for numeric fields #10329

Open SinergiaCRM opened 5 months ago

SinergiaCRM commented 5 months ago

Issue

When a not null condition is used on a numeric field on a workflow condition, if the field is null the workflow does not execute.

Expected Behavior

The workflow should be executed when the condition is met (the field is null).

Actual Behavior

The workflow is not executed

Possible Fix

Take into account the field type when evaluating "is null" condition.

Steps to Reproduce

  1. Add a numeric field to a module
  2. Define a workflow on that module
  3. Define a condition that requires that field to be null
  4. Check that on save (and on the scheduler) the workflow is not executed

Context

We were trying to define some workflows to fire when no amount was specified

Your Environment

SuiteCRM Version used: 7.14.2 Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome Environment name and version (e.g. MySQL, PHP 7): PHP 7.4 Operating System and version (e.g Ubuntu 16.04): Ubuntu 22.04