Bug 1379541

Summary: Bug in rules engine recursive action detection
Product: [Community] Bugzilla Reporter: Matt Tyson 🤬 <mtyson>
Component: Internal ToolsAssignee: Matt Tyson 🤬 <mtyson>
Internal Tools sub component: Rules Engine QA Contact: tools-bugs <tools-bugs>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: huiwang, poelstra, qgong, rcyriac
Version: 4.4   
Target Milestone: 4.4   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.4.12063.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-28 00:13:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1393131    

Description Matt Tyson 🤬 2016-09-27 04:55:55 UTC
The BRE code does not correctly validate rules when performing recursive action checks.  These cases should work, but instead a recursive action error is thrown.


Target release issue:

The target_release field is not properly checked when performing rules validation.

When: 'Target Release' 'is not any of' '2.1,2.2'
Then: Change 'Target Release' to '2.2'



Flag Groups

If you create a flag group and select some flags, a recursive rule error will be thrown when attempting to check flags against it.

Create a flag group with the foo-flag checked.

When: 'Foo Flag group' 'all' 'unset'
Then: 'foo-flag' 'change' '?'

Comment 1 Matt Tyson 🤬 2016-11-08 23:13:02 UTC
The Keywords field also seems to have this same problem

When: 'Keywords' 'is not an of' 'Triaged,Unconfirmed'
Then: Set 'Unconfirmed'

This pops up an error about not checking for Unconfirmed.

Comment 2 Rony Gong 🔥 2016-11-15 08:18:03 UTC
Tested on QA environment(4.4.12063-2)
Result: Pass
Steps:
1.Create rule with below criterion and actions separately
When: 'Target Release' 'is not any of' '2.1,2.2'
Then: Change 'Target Release' to '2.2'

Create a flag group with the foo-flag checked.
When: 'Foo Flag group' 'all' 'unset'
Then: 'foo-flag' 'change' '?'

When: 'Keywords' 'is not an of' 'Triaged,Unconfirmed'
Then: Set 'Unconfirmed'

==>Could create above rules smoothly without any error message.

Comment 3 Rony Gong 🔥 2016-11-15 08:18:04 UTC
Tested on QA environment(4.4.12063-2)
Result: Pass
Steps:
1.Create rule with below criterion and actions separately
When: 'Target Release' 'is not any of' '2.1,2.2'
Then: Change 'Target Release' to '2.2'

Create a flag group with the foo-flag checked.
When: 'Foo Flag group' 'all' 'unset'
Then: 'foo-flag' 'change' '?'

When: 'Keywords' 'is not an of' 'Triaged,Unconfirmed'
Then: Set 'Unconfirmed'

==>Could create above rules smoothly without any error message.

Comment 4 Matt Tyson 🤬 2016-11-28 00:13:27 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.