Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JEXL expression in subject.condition #4555

Open
fgalan opened this issue May 29, 2024 · 1 comment
Open

JEXL expression in subject.condition #4555

fgalan opened this issue May 29, 2024 · 1 comment
Labels
Milestone

Comments

@fgalan
Copy link
Member

fgalan commented May 29, 2024

Is your feature request related to a problem / use case? Please describe.

After the implementation of #4004, JEXL is supported in custom notifications. However, it would be great to support it also in the condition triggering the notification. That would expand the support to new use cases.

Describe the solution you'd like

Include a new field in subject.condition in subscription which value would be a JEXL expressions. If that expression is evaluated to true then the notification is triggered (as usual, combining the condition with AND semantics with the other conditions in subject.condition, ej. q-filter, geo-filter, etc.).

Not sure how to name the new field. expression would be a great name, but it is already taken :)

Describe alternatives you've considered

None.

Describe why you need this feature

  • To approach a new use case.
  • To improve or simplify an scenario.
@fgalan fgalan added the backlog label May 29, 2024
@fgalan fgalan added this to the 4.1.0 milestone Jul 3, 2024
@fgalan
Copy link
Member Author

fgalan commented Jul 3, 2024

Current q and mq evaluation (the jexl check should be added in a similar place)

    /* Check 2: String Filters */
    if ((tSubP->stringFilterP != NULL) && (!tSubP->stringFilterP->match(notifyCerP)))
    {
      continue;
    }

    if ((tSubP->mdStringFilterP != NULL) && (!tSubP->mdStringFilterP->match(notifyCerP)))
    {
      continue;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant