svn commit: r606787 - in /ofbiz/trunk/specialpurpose/projectmgr: src/org/ofbiz/project/Various.java widget/forms/TaskForms.xml

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

svn commit: r606787 - in /ofbiz/trunk/specialpurpose/projectmgr: src/org/ofbiz/project/Various.java widget/forms/TaskForms.xml

hansbak-2
Author: hansbak
Date: Tue Dec 25 04:08:23 2007
New Revision: 606787

URL: http://svn.apache.org/viewvc?rev=606787&view=rev
Log:
some more improvements to dependency screen and sheduler

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java?rev=606787&r1=606786&r2=606787&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java Tue Dec 25 04:08:23 2007
@@ -45,9 +45,11 @@
      while (a.hasNext()) {
      GenericValue assoc = (GenericValue) a.next();
      GenericValue nextTask = assoc.getRelatedOne("ToWorkEffort");
-     nextTask.put("estimatedStartDate", task.getTimestamp("estimatedCompletionDate"));
-     nextTask.put("estimatedCompletionDate", calculateCompletionDate(nextTask, task.getTimestamp("estimatedCompletionDate")));
-     nextTask.store();
+     if (nextTask.getTimestamp("estimatedStartDate").before(task.getTimestamp("estimatedCompletionDate"))) {
+     nextTask.put("estimatedStartDate", task.getTimestamp("estimatedCompletionDate"));
+         nextTask.put("estimatedCompletionDate", calculateCompletionDate(nextTask, task.getTimestamp("estimatedCompletionDate")));
+         nextTask.store();
+     }
      setDatesFollowingTasks(nextTask);
      }
      }

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=606787&r1=606786&r2=606787&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Tue Dec 25 04:08:23 2007
@@ -325,7 +325,7 @@
         <field name="workEffortAssocTypeId"><hidden value="WORK_EFF_DEPENDENCY"/></field>
         <field name="relatedTasks" parameter-name="workEffortIdFrom">
             <drop-down>
-                <entity-options entity-name="ProjectAndPhaseAndTask" key-field-name="workEffortId" description="${phaseName} -- ${workEffortName}">
+                <entity-options entity-name="ProjectAndPhaseAndTask" key-field-name="workEffortId" description="${workEffortName} -- ${phaseName}">
                     <entity-constraint name="projectId" value="${projectId}"/>
                     <entity-constraint name="workEffortId" operator="not-equals" env-name="workEffortId"/>
                     <entity-order-by field-name="phaseName"/>
@@ -341,7 +341,7 @@
         <field name="workEffortAssocTypeId"><hidden value="WORK_EFF_DEPENDENCY"/></field>
         <field name="relatedTasks" parameter-name="workEffortIdTo">
             <drop-down>
-                <entity-options entity-name="ProjectAndPhaseAndTask" key-field-name="workEffortId" description="${phaseName} -- ${workEffortName}">
+                <entity-options entity-name="ProjectAndPhaseAndTask" key-field-name="workEffortId" description="${workEffortName} -- ${phaseName}">
                     <entity-constraint name="projectId" value="${projectId}"/>
                     <entity-constraint name="workEffortId" operator="not-equals" env-name="workEffortId"/>
                     <entity-order-by field-name="phaseName"/>