Bug 1029908

Summary: Drools date coercion and conditional OR
Product: [Retired] JBoss BRMS Platform 6 Reporter: Mario Fusco <mfusco>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0   
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1072217 (view as bug list) Environment:
Last Closed: 2014-08-06 20:18:10 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:
Bug Depends On:    
Bug Blocks: 1072217    

Description Mario Fusco 2013-11-13 13:53:06 UTC
If I try a simple Drools rule with conditions on date type and uses conditional OR (||) I get the following error. If I change || to && it works fine.

Condition
$container: DateContainer( date >= "15-Oct-2013" || date <= "01-Oct-2013" )

Error
Unable to Analyse Expression date >= "15-Oct-2013" || date <= "01-Oct-2013":
[Error: Comparison operation requires compatible types. Found class java.util.Date and class java.lang.String]
[Near :
{... date >= "15-Oct-2013" || date <= "01-Oct-2013" ....}

]
^
[Line: 9, Column: 1] : [Rule name='Test rule']

Comment 1 Mario Fusco 2013-11-13 13:54:04 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/ba2fbd53b

Comment 2 JBoss JIRA Server 2013-11-13 13:54:58 UTC
Mario Fusco <mario.fusco> updated the status of jira DROOLS-296 to Resolved

Comment 4 Marek Winkler 2013-12-13 07:26:49 UTC
Verified on BRMS 6.0.0 ER5.