Number-based alerts are broken
See original GitHub issueIssue Summary
It looks like the alert always sees a query result as a string and not a number. So an alert configured to trigger when field = 0
never triggers because "0"
does not equal 0
.
The alerts seems to evaluate fine for targets that are obviously strings. If the alert should trigger if field = boyhowdy
then the alert triggers when field
is “boyhowdy”.
Steps to Reproduce
- Save a query that returns 0:
SELECT 0 "value"
- Make an alert for the query that triggers when
value = 0
- Run the query
- Observe the alert does not trigger.
The converse is also true, by the way.
- Same as above
- Make an alert for the query that triggers when
value != 0
- Run the query
- Observe the alert triggers
Technical details:
- Redash Version: 9.0.0-alpha+b348b58b (348b58b)
- Browser/OS: Firefox on MacOS
- How did you install Redash: SaaS
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Android Notifications Not Showing Up? 10 Fixes You Can Try
Not seeing notifications show up on your Android phone? Try these fixes to get Android notifications working again.
Read more >Location-based / geofencing alerts broken in UniFi Protect
After updating the firmware on my Cloud Key Gen2 Plus about a month ago, the geofencing functionality stopped working. Since then I have...
Read more >Alerts/Widget Troubleshooting - Streamlabs
Ensure that both options have something selected. Go to Streamlabs.com > Alert Box > Follows/Subscriptions/Donations/Etc. > Alert Animation and make sure there ...
Read more >5 ways to fix iPhone notifications when you're not receiving them
1. Hold down the side button and volume up button or volume down button. · 2. When the power slider appears on your...
Read more >[Still persists] iPhone users on iOS 14 reporting no ...
Several users have taken to the Apple forums complaining about receiving no notifications or alerts on iOS 14. The cause behind the problem...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not sure about this, but perhaps we can hint at string values with apostrophes.
I think that if query result is a number, then we should try to cast both to number. In other cases: use a string.
Because the operation options we show are based on the query result type, the threshold should adhere. We might want to enforce this in the UI.