Re: svn commit: r799206 - /ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r799206 - /ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

Adrian Crum
Hans,

Aren't those checks done previously in the entity condition code? In
other words, the work effort you're skipping over should not have been
in the validWorkEfforts List to begin with. The fact that it is a
recurring work effort is irrelevant.

-Adrian

[hidden email] wrote:

> Author: hansbak
> Date: Thu Jul 30 08:57:03 2009
> New Revision: 799206
>
> URL: http://svn.apache.org/viewvc?rev=799206&view=rev
> Log:
> recurring events were always public: fixed
>
> Modified:
>     ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
>
> Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=799206&r1=799205&r2=799206&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
> +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Thu Jul 30 08:57:03 2009
> @@ -627,6 +627,10 @@
>                  Calendar cal = UtilDateTime.toCalendar(startStamp, timeZone, locale);
>                  for (GenericValue workEffort : validWorkEfforts) {
>                      if (UtilValidate.isNotEmpty(workEffort.getString("tempExprId"))) {
> +                     // check if either the workeffort is public or the requested party is a member
> +                     if (UtilValidate.isNotEmpty(partyIdsToUse) && !workEffort.getString("scopeEnumId").equals("WES_PUBLIC") && !partyIdsToUse.contains(workEffort.getString("partyId"))) {
> +                     continue;
> +                     }
>                          TemporalExpression tempExpr = TemporalExpressionWorker.getTemporalExpression(delegator, workEffort.getString("tempExprId"));
>                          Set<Date> occurrences = tempExpr.getRange(range, cal);
>                          for (Date occurrence : occurrences) {
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r799206 - /ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

hans_bakker
Hi Adrian,

in line 577 recurring events are always selected because their start
dates can be empty. In general workefforts are only selected if at least
an actual or an estimated start date is present

Regards,
Hans

On Thu, 2009-07-30 at 10:06 -0700, Adrian Crum wrote:
Hans,

Aren't those checks done previously in the entity condition code? In
other words, the work effort you're skipping over should not have been
in the validWorkEfforts List to begin with. The fact that it is a
recurring work effort is irrelevant.

-Adrian

--
Antwebsystems.com: Quality OFBiz services for competitive rates