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

Fix #10329 - 'Is null' condition does not work on workflows conditions for numeric fields #10330

Closed enricsinergia closed 5 months ago

enricsinergia commented 5 months ago

Description

When evaluating "is null" conditions on workflows conditions, a special case is added when the type is numeric. When checking if a field is null it was being compared to '', bu tnull numeric types are setted to NULL, so the condition was not met. The field type has been added to the function, and a special case for numeric fields hs been added.

Motivation and Context

Is null check was not working for numeric fields.

How To Test This

  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 executed if and only if the field is null.

Types of changes

Final checklist