You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2016/08/27 12:57:25 UTC
svn commit: r1758022 - in
/ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort:
WorkEffortSearch.java WorkEffortServices.java
Author: ashish
Date: Sat Aug 27 12:57:25 2016
New Revision: 1758022
URL: http://svn.apache.org/viewvc?rev=1758022&view=rev
Log:
Applied patch from jira issue - OFBIZ-7857 - Clean up commented out code in Java source for Workeffort.
Thanks Harsh for the contribution.
Modified:
ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearch.java
ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java
Modified: ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=1758022&r1=1758021&r2=1758022&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original)
+++ ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearch.java Sat Aug 27 12:57:25 2016
@@ -303,8 +303,6 @@ public class WorkEffortSearch {
}
dynamicViewEntity.addAlias("WEFF", "workEffortId", null, null, null, Boolean.valueOf(workEffortIdGroupBy), null);
- // Debug.logInfo("WorkEffortSearch, whereCondition = " + whereCondition.toString(), module);
-
EntityListIterator eli = null;
try {
int maxRows = 0;
@@ -338,18 +336,6 @@ public class WorkEffortSearch {
boolean hasResults = false;
Object initialResult = null;
- /* this method has been replaced by the following to address issue with SAP DB and possibly other DBs
- if (resultOffset != null) {
- Debug.logInfo("Before relative, current index=" + eli.currentIndex(), module);
- hasResults = eli.relative(resultOffset.intValue());
- } else {
- initialResult = eli.next();
- if (initialResult != null) {
- hasResults = true;
- }
- }
- */
-
initialResult = eli.next();
if (initialResult != null) {
hasResults = true;
@@ -399,21 +385,6 @@ public class WorkEffortSearch {
} else {
duplicatesFound++;
}
-
- /*
- StringBuilder lineMsg = new StringBuilder("Got search result line: ");
- Iterator<String> fieldsToSelectIter = fieldsToSelect.iterator();
- while (fieldsToSelectIter.hasNext()) {
- String fieldName = fieldsToSelectIter.next();
- lineMsg.append(fieldName);
- lineMsg.append("=");
- lineMsg.append(searchResult.get(fieldName));
- if (fieldsToSelectIter.hasNext()) {
- lineMsg.append(", ");
- }
- }
- Debug.logInfo(lineMsg.toString(), module);
- */
}
if (searchResult != null) {
Modified: ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=1758022&r1=1758021&r2=1758022&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java (original)
+++ ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java Sat Aug 27 12:57:25 2016
@@ -504,7 +504,6 @@ public class WorkEffortServices {
Collection<String> partyIds = UtilGenerics.checkCollection(context.get("partyIds"));
String facilityId = (String) context.get("facilityId");
String fixedAssetId = (String) context.get("fixedAssetId");
- // Debug.logInfo("======by period for fixedAsset: " + fixedAssetId + " facilityId: " + facilityId + "partyId: " + partyId + " entityExprList:" + (List) context.get("entityExprList"));
String workEffortTypeId = (String) context.get("workEffortTypeId");
Boolean filterOutCanceledEvents = (Boolean) context.get("filterOutCanceledEvents");
if (filterOutCanceledEvents == null) {
@@ -527,7 +526,6 @@ public class WorkEffortServices {
// get a timestamp (date) for the beginning of today and for beginning of numDays+1 days from now
// Commenting this out because it interferes with periods that do not start at the beginning of the day
- // Timestamp startStamp = UtilDateTime.getDayStart(startDay, timeZone, locale);
Timestamp startStamp = startDay;
Timestamp endStamp = UtilDateTime.adjustTimestamp(startStamp, periodType, 1, timeZone, locale);
long periodLen = endStamp.getTime() - startStamp.getTime();
@@ -613,18 +611,9 @@ public class WorkEffortServices {
entityExprList.addAll(periodCheckAndlList);
- // (non cancelled) recurring events
- /* Commenting this out. This condition adds ALL recurring events to ALL calendars.
- List<EntityCondition> recurringEvents = UtilMisc.<EntityCondition>toList(EntityCondition.makeCondition("tempExprId", EntityOperator.NOT_EQUAL, null));
- if (filterOutCanceledEvents.booleanValue()) {
- recurringEvents.addAll(cancelledCheckAndList);
- }
- */
-
try {
List<GenericValue> tempWorkEfforts = null;
if (UtilValidate.isNotEmpty(partyIdsToUse)) {
- // Debug.logInfo("=====conditions for party: " + eclTotal);
tempWorkEfforts = EntityQuery.use(delegator).from("WorkEffortAndPartyAssignAndType").where(entityExprList).orderBy("estimatedStartDate").filterByDate().queryList();
} else {
tempWorkEfforts = EntityQuery.use(delegator).from("WorkEffort").where(entityExprList).orderBy("estimatedStartDate").queryList();