-
-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
Description
I tried to create a rule that reacts on a specific slack message.
The criteria operator has not been changed and is still the one that's shown per default (regex).
Saving the rule fails with:
{ "faultstring": "For field: trigger.text, operator not in list of allowed operators: ['matchwildcard', 'matchregex', 'regex', 'iregex', 'eq', 'equals', 'neq', 'nequals', 'ieq', 'iequals', 'contains', 'icontains', 'ncontains', 'incontains', 'startswith', 'istartswith', 'endswith', 'iendswith', 'lt', 'lessthan', 'gt', 'greaterthan', 'td_lt', 'timediff_lt', 'td_gt', 'timediff_gt', 'exists', 'nexists', 'inside', 'in', 'ninside', 'nin', 'search']" }
This happens because the preselected operator is not sent to the backend as a look on the request parameters shows:
{
"pack": "slack",
"enabled": true,
"trigger": {
"type": "slack.message",
"parameters": {}
},
"criteria": {
"trigger.text": {
"type": "",
"pattern": "foo"
}
},
"action": {
"ref": "core.local",
"parameters": {
"cmd": "date -u"
}
},
"name": "slack2",
"description": "slack"
}
criteria.trigger.text.type should be regex.
It works fine if you select any other operator or any other operator and then regex again.
Reactions are currently unavailable
