You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently discovered a bug in the automation rules and I'm surprised noone mentioned this yet.
The operators in the automatic graph creation criteria, e.g. 'greater than', 'less than or equal' etc. are always performing alphabetical instead of numerical comparison due to forced escaping in the sql query.
This might be desireable in some cases but it caused me some issues, as it the following example statements evaluate to true: '200' < '3' '50' >= '1000000'
Steps to reproduce the behavior:
Create a graph rule, add graph creation criteria
Set operator to 'is less than or equal'
Select a field with a known value, that value might be 900
Set 'Matching Pattern' to 1000
See that it is not finding your device entry with value 900
I suggest this fix:
Original file: api/api_automation.php, function build_rule_item_filter, line ~1721-1724:
Hey,
I recently discovered a bug in the automation rules and I'm surprised noone mentioned this yet.
The operators in the automatic graph creation criteria, e.g. 'greater than', 'less than or equal' etc. are always performing alphabetical instead of numerical comparison due to forced escaping in the sql query.
This might be desireable in some cases but it caused me some issues, as it the following example statements evaluate to true:
'200' < '3'
'50' >= '1000000'
Steps to reproduce the behavior:
I suggest this fix:
Original file:
api/api_automation.php
, functionbuild_rule_item_filter
, line ~1721-1724:To disable escaping numerical values:
If the matching sequence is not numeric, the old alphabetical style comparison will still be used.
The text was updated successfully, but these errors were encountered: