Closed SilviaAmAm closed 2 years ago
The bug comes from the definition of an advanced logic rule. When you are creating an advanced logic rule, you can compare a field to a string. Now, let's say the field compared is an integer with operatorrs like >, <, ...
json { ">": [ { "var": "number" }, "280.00,00" ] }
This advanced logic rule is considered valid. However, In the JsonLogic verification, as soon as the one of the two compared values is an int or a float, the function will try to convert both values to float type.
But the string might not be convertible (like in the above advanced logic rule). In addition, this bug could also be reproduced by switching the values :
json { ">": [ { "var": "text" }, 2800 ] }
In that case, the field is a string but we want to compare it to an int
Product versie / Product version
1.0.12
Omschrijf het probleem / Describe the bug
Seen in Horst aan de Maas production (from sentry):
During /api/v1/submissions/{submission_uuid}/steps/{step_uuid}/_check_logic
Stappen om te reproduceren / Steps to reproduce
No response
Verwacht gedrag / Expected behavior
No response
Screen resolution
No response
Device
No response
OS
No response
Browser
No response