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 #10331

Open SinergiaCRM opened 5 months ago

SinergiaCRM 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

serhiisamko091184 commented 5 months ago

Hello @SinergiaCRM,

thanks for constantly contributing to the SuiteCRM project,

would you be so kind to:

1) update the changes to the code base only related to this specific issue ('is null' condition):

image Seems like a part of the committed changes represent another PR:
https://github.com/salesagility/SuiteCRM/pull/9720

2) update the code to clear the comments across the file: image

Like in this example: https://github.com/salesagility/SuiteCRM/pull/10032/files

Many thanks in advance!

Regards, Serhii

SinergiaCRM commented 5 months ago

Hi @serhiisamko091184,

sorry, I used the file as we have it and didn't think there were any more changes. I have already corrected the branch.

serhiisamko091184 commented 5 months ago

Hello @SinergiaCRM,

great, thanks a lot for the quick reply and changes,

one minor update, please: image

we'd like to reference a particular issue associated with the current contribution, like in this example:

image

Many thanks in advance!

enricsinergia commented 5 months ago

Hi @serhiisamko091184, Commit message updated

serhiisamko091184 commented 5 months ago

Hello @enricsinergia!

Thanks for the changes.

Regards, Serhii