Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1253576

Summary: Drools nested date comparison expressions with OR condition
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Hisao Furuichi <hfuruich>
Component: BRE (Expert, Fusion)Assignee: Nobody <nobody>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1253575 Environment:
Last Closed: 2025-02-10 03:48:00 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: 1253575    
Bug Blocks:    

Description Hisao Furuichi 2015-08-14 07:02:03 UTC
+++ This bug was initially created as a clone of Bug #1253575 +++

Description of problem:

Following RHS which uses Date object comparison works fine:

DateContainer( date >= "15-Oct-2013" || date <= "01-Oct-2013" )

If there are multiple conditions connecting with "||" or "&&" as follows, syntax error occurs:

DateContainer ( (date >= "19-Dec-2015" && date <= "03-Jan-2016" ) || (date >= "17-Dec-2016" && date <= "02-Jan-2017" ))	

Exception is

===
Unable to Analyse Expression date >= "19-Dec-2015" && date <= "03-Jan-2016" || date >= "17-Dec-2016" && date <= "02-Jan-2017":
[Error: Comparison operation requires compatible types. Found class java.util.Date and class java.lang.String]
[Near : {... "03-Jan-2016" || date >= "17-Dec-2016" && date <= "02-Jan-2017" ....}]
                                                               ^
[Line: 25, Column: 2]
===

Additional info:
BZ-1072217 covers non-nested comparison like this:

DateContainer( date >= "15-Oct-2013" || date <= "01-Oct-2013" )

--- Additional comment from Hisao Furuichi on 2015-08-14 03:00:02 EDT ---

I tested with BRMS 6.1.2, and the issue still occurs.

Comment 1 Hisao Furuichi 2015-08-14 07:02:50 UTC
The issue still occurs with BRMS 5.3.1 with rollup patch #5

Comment 7 Red Hat Bugzilla 2025-02-10 03:48:00 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.