From 999fdc5d962aba06ecf2ea39b9d5facddb8d160c Mon Sep 17 00:00:00 2001 From: Adrian Crum Date: Thu, 29 Dec 2011 20:52:35 +0000 Subject: [PATCH] Added a source code comment and service definition documentation to clear up some confusing behavior in the getWorkEffortEventsByPeriod service. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1225647 13f79535-47bb-0310-9956-ffa450edef68 --- applications/workeffort/servicedef/services.xml | 5 ++++- .../org/ofbiz/workeffort/workeffort/WorkEffortServices.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/applications/workeffort/servicedef/services.xml b/applications/workeffort/servicedef/services.xml index fbc69cc5bb..7c44e29d69 100644 --- a/applications/workeffort/servicedef/services.xml +++ b/applications/workeffort/servicedef/services.xml @@ -266,7 +266,10 @@ under the License. If filterOutCanceledEvents is set to Boolean(true) then workEfforts with currentStatusId=EVENT_CANCELLED will not be returned. To limit the events to a particular partyId, specify the partyId. To limit the events to a set of partyIds, specify a Collection of partyIds. - + + Can be either CAL_PERSONAL or CAL_MANUFACTURING, defaults to CAL_PERSONAL. The value controls the type of work efforts + returned. To bypass this behavior, use an invalid value (like VOID). + diff --git a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java index 8bd54c020c..3eb6067b8c 100644 --- a/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java +++ b/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java @@ -508,6 +508,8 @@ public class WorkEffortServices { String calendarType = (String) context.get("calendarType"); if (UtilValidate.isEmpty(calendarType)) { + // This is a bad idea. This causes the service to return only those work efforts that are assigned + // to the current user even when the service parameters have nothing to do with the current user. calendarType = "CAL_PERSONAL"; } String partyId = (String) context.get("partyId");