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
This commit is contained in:
@@ -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.
|
||||
</description>
|
||||
<attribute name="calendarType" type="String" mode="IN" optional="true"/>
|
||||
<attribute name="calendarType" type="String" mode="IN" optional="true">
|
||||
<description>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).</description>
|
||||
</attribute>
|
||||
<attribute name="partyId" type="String" mode="IN" optional="true"/>
|
||||
<attribute name="partyIds" type="java.util.Collection" mode="IN" optional="true"/>
|
||||
<attribute name="facilityId" type="String" mode="IN" optional="true"/>
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user