svn commit: r1225647 - in /ofbiz/trunk/applications/workeffort: servicedef/services.xml src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

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

svn commit: r1225647 - in /ofbiz/trunk/applications/workeffort: servicedef/services.xml src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

adrianc
Author: adrianc
Date: Thu Dec 29 20:52:35 2011
New Revision: 1225647

URL: http://svn.apache.org/viewvc?rev=1225647&view=rev
Log:
Added a source code comment and service definition documentation to clear up some confusing behavior in the getWorkEffortEventsByPeriod service.

Modified:
    ofbiz/trunk/applications/workeffort/servicedef/services.xml
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

Modified: ofbiz/trunk/applications/workeffort/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/servicedef/services.xml?rev=1225647&r1=1225646&r2=1225647&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/workeffort/servicedef/services.xml Thu Dec 29 20:52:35 2011
@@ -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"/>

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=1225647&r1=1225646&r2=1225647&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 Dec 29 20:52:35 2011
@@ -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");