[jboss-jira] [JBoss JIRA] (DROOLS-2650) date comparison using LocatDateTime

Mario Fusco (JIRA) issues at jboss.org
Fri Sep 21 03:20:00 EDT 2018


     [ https://issues.jboss.org/browse/DROOLS-2650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco updated DROOLS-2650:
--------------------------------
    Sprint: 2018 Week 36-38


> date comparison using LocatDateTime
> -----------------------------------
>
>                 Key: DROOLS-2650
>                 URL: https://issues.jboss.org/browse/DROOLS-2650
>             Project: Drools
>          Issue Type: Feature Request
>          Components: core engine
>    Affects Versions: 7.7.0.Final
>         Environment: Windows 7, Java 8
>            Reporter: Sachin Subhedar
>            Assignee: Mario Fusco
>
> While upgrading Drools from version 6.5 to 7.7.0, there is a compile issue in rules that use Date Compare. 
> e.g. the following rule works fine in 6.5, but errors out in 7.7.0:
> when
>    $inventory : AllocatedInventory(expireDateTime != null && (expireDateTime > Custom.todayPlus(0) &&  <= Custom.todayPlus(2)) )
>> then
>     modify(...) {
>    ...
>     }
>     retract($inventory);
> end
> =======================
> Custom function returns Java LocalDateTime (java.util.Date and JodaTime use is deprecated)
> The reason it breaks is due to check in function https://github.com/kiegroup/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/rule/builder/MVELConstraintBuilder.java#L229
> Previous version does not have that check. Now, it seems the compiler check compares date value to java.util.Date
> Request a feature to allow LocalDateTime date compare



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list