Author: jacopoc
Date: Wed Mar 21 08:35:04 2007
New Revision: 520917
URL:
http://svn.apache.org/viewvc?view=rev&rev=520917Log:
Cancelled work effort (both calendar events and production runs/tasks) are no more shown in the calendar screens.
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?view=diff&rev=520917&r1=520916&r2=520917==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Wed Mar 21 08:35:04 2007
@@ -265,6 +265,10 @@
List entityExprList = UtilMisc.toList(
new EntityExpr("estimatedCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, startStamp),
new EntityExpr("estimatedStartDate", EntityOperator.LESS_THAN, endStamp));
+ // Filter out all the canceled work efforts
+ entityExprList.add(new EntityExpr("currentStatusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED"));
+ entityExprList.add(new EntityExpr("currentStatusId", EntityOperator.NOT_EQUAL, "PRUN_CANCELLED"));
+
List typesList = UtilMisc.toList(new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "EVENT"));
if (partyIds != null && partyIds.size() > 0) {
entityExprList.add(new EntityExpr("partyId", EntityOperator.IN, partyIds));
@@ -297,6 +301,7 @@
// by the query on the WorkEffortAndPartyAssign view when no party was
// specified; now it is no more necessary since, when no party is specified,
// the query is done on the WorkEffort entity.
+ /*
Set tempWeKeys = new HashSet();
Iterator tempWorkEffortIter = tempWorkEfforts.iterator();
while (tempWorkEffortIter.hasNext()) {
@@ -308,7 +313,7 @@
tempWeKeys.add(tempWorkEffortId);
}
}
-
+ */
validWorkEfforts = new ArrayList(tempWorkEfforts);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);