Skip to content

Number-based alerts are broken #4279

@susodapop

Description

@susodapop

Issue 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

  1. Save a query that returns 0: SELECT 0 "value"
  2. Make an alert for the query that triggers when value = 0
  3. Run the query
  4. Observe the alert does not trigger.

The converse is also true, by the way.

  1. Same as above
  2. Make an alert for the query that triggers when value != 0
  3. Run the query
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions