Closed (fixed)
Project:
Calculation Fields
Version:
1.0.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2024 at 12:32 UTC
Updated:
30 Jan 2026 at 19:09 UTC
Jump to comment: Most recent
If the field value is a falsey/empty value like FALSE or [], then the default value is never used.
Added test cases to showcase the behaviour.
Add checks for if the value is: not empty, and is numeric.
That way 0 is not accidentally picked up as empty.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
codebymikey commentedComment #4
joaopauloc.dev commentedI couldn't reproduce it, it probably was fixed in the new release.
Comment #5
codebymikey commentedYeah, it appears this was fixed in a later release. Just added the the previous test case for completeness-sake.
If the field value is an empty value like
FALSEor[], then the default is not currently used.So updating the issue to support that instead, whilst also adding test cases for
0.Comment #6
joaopauloc.dev commentedSeems good to me, I'll have a look this weekend.
Thanks.
Comment #8
joaopauloc.dev commented