You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2009/07/30 19:06:00 UTC

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

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

hansbak@apache.org 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) {
> 
> 
> 


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

Posted by Hans Bakker <ma...@antwebsystems.com>.
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