-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
2024 Week 07-09 (from Feb 12)
-
NEW
-
NEW
-
---
-
---
Issue Description:
An assigned variable doesn't match when it's on the left side of a constraint
For example,
[
{
"RuleSet": {
"name": "demo",
"hosts": [
"localhost"
],
"sources": [
{
"EventSource": {
"name": "ansible.eda.generic",
"source_name": "ansible.eda.generic",
"source_args": {
"payload": [
{
"xyz": 300,
"pr": 456
},
{
"prs_list": [
456,
457
]
}
]
},
"source_filters": []
}
}
],
"rules": [
{
"Rule": {
"name": "r41",
"condition": {
"AllCondition": [
{
"AssignmentExpression": {
"lhs": {
"Events": "varname"
},
"rhs": {
"EqualsExpression": {
"lhs": {
"Event": "xyz"
},
"rhs": {
"Integer": 300
}
}
}
}
},
{
"ItemInListExpression": {
"lhs": {
"Events": "varname.pr"
},
"rhs": {
"Event": "prs_list"
}
}
}
]
},
"actions": [
{
"Action": {
"action": "debug",
"action_args": {
"msg": "Assignment works"
}
}
}
],
"enabled": true
}
}
]
}
}
]
Acceptance Criteria:
Match the rule.