Bug 971008

Summary: Inline cast does not work with matches operator
Product: [Retired] JBoss BRMS Platform 6 Reporter: Tomas Schlosser <tschloss>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Schlosser <tschloss>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: etirelli, mfusco, rzhang
Target Milestone: ER5Keywords: Reopened
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:20:04 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:
Embargoed:

Description Tomas Schlosser 2013-06-05 12:51:00 UTC
Description of problem:
Using matches operator with field extracted using inline cast can't be compiled.

Version-Release number of selected component (if applicable):
Drools 6.0.0.Beta3, Drools master (2013-06-05)

How reproducible:
Pull request with reproducer submitted on Github.

Steps to Reproduce:
1. run testMatchesOperator JUnit test

Actual results:
Package is not built, complaining about right side not being of type boolean

Expected results:
Package compiles fine and rules are evaluated correctly

Additional info:
Additional operators may be affected as well.

Comment 1 Tomas Schlosser 2013-06-05 12:56:50 UTC
Submitted as pull request #208

Comment 2 Ryan Zhang 2013-07-11 06:17:30 UTC

*** This bug has been marked as a duplicate of bug 971001 ***

Comment 3 Tomas Schlosser 2013-09-02 15:00:01 UTC
Why was this bug marked as duplicate?
It is not the duplicate of bug 971001 as it has completely different symptoms at different time (this is rules compile time problem).

Marking this reopened as it is not fixed in BRMS 6.0.0.ER2.

Comment 4 Mario Fusco 2013-09-30 07:47:03 UTC
Tomas, I wanted to reproduce this issue but I couldn't find that testMatchesOperator you mentioned in your first comment. Where is it?

Comment 5 Tomas Schlosser 2013-09-30 12:33:02 UTC
Hi Mario,
check the pull request #208 in drools repository. It was closed, but it seems the tests were never used. Have a look there and merge the tests, please.

https://github.com/droolsjbpm/drools/pull/208

Comment 6 Mario Fusco 2013-10-03 12:47:58 UTC
It was a mvel bug that I fixed here https://github.com/mvel/mvel/commit/8e54d02ed8f7f75ee51f5057dedb99c063040691

The fix will be available with the next mvel release (that I will drop asap).

Comment 10 Tomas Schlosser 2013-12-10 20:06:32 UTC
Verified in BRMS-6.0.0 ER5.