[ 
https://issues.apache.org/jira/browse/OFBIZ-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gil Portenseigne updated OFBIZ-6637:
------------------------------------
    Attachment: OFBIZ-6637.patch

I did some more analysis around this issue, i may have found an irregularity 
about temporal expression.

The issue come when evaluating DAiLY_GRIND temporal expression, which is and 
intersection of daily 8am rule, and monday to friday without US federal 
holidays rule.

 First is evaluated the smallest unit of time i.e. 8am rule. The next() method 
will find its way easily, but... it's might be a day after, and in the 
ExpressionContext, dayBumped value is set to "true". 

The inifinite loop come from the second rule next() method, which is a 
difference working on a day on week  basis. 

        public Calendar next(Calendar cal, ExpressionContext context) {
            Calendar next = (Calendar) cal.clone();
            if (includesDate(next)) {
                if (context.dayBumped) {
                    return next;
                }

next method return itself if dayBumped is set to true. Fine for the first time, 
bad for the next leading to an infinite loop.

The patch I provide is simple and seems the good way to fix it.

Then inifinite loop will not appear with a daily_grind recurrent workeffort. 

I find out that the calendar have a strange behaviour displaying my recurrent 
workeffort, i will continue studying it to see if the origin is this fix (i 
don't think so)...

> Work Effort Month Calendar View Is Broken
> -----------------------------------------
>
>                 Key: OFBIZ-6637
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6637
>             Project: OFBiz
>          Issue Type: Bug
>          Components: workeffort
>    Affects Versions: Upcoming Branch
>            Reporter: Adrian Crum
>         Attachments: OFBIZ-6637.patch
>
>
> The Work Effort Month calendar view does not work. The screen does not 
> display:
> https://localhost:8443/workeffort/control/calendar?period=month
> and CPU utilization remains high. It appears to be in an endless loop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to