svn commit: r607377 - in /ofbiz/trunk/specialpurpose/projectmgr: script/org/ofbiz/project/ProjectServices.xml src/org/ofbiz/project/Various.java

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

svn commit: r607377 - in /ofbiz/trunk/specialpurpose/projectmgr: script/org/ofbiz/project/ProjectServices.xml src/org/ofbiz/project/Various.java

hansbak-2
Author: hansbak
Date: Fri Dec 28 21:31:11 2007
New Revision: 607377

URL: http://svn.apache.org/viewvc?rev=607377&view=rev
Log:
in the sheduler set the default length of a task to 3 days, so the gannt chart will show even with missing data

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java

Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml?rev=607377&r1=607376&r2=607377&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Fri Dec 28 21:31:11 2007
@@ -105,6 +105,7 @@
                 2. a workweek has 40 hours and 5 days.
                 3. The order of the execution of the tasks is set by the workeffortassociation.
                 4. The default start of the project is today
+                5. default length of a task is 3 day if not planned hours entered
                 
                 The steps of the program are:
                 1. read all tasks  and check if there are predesessors, when not set he estimated dates

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=607377&r1=607376&r2=607377&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java Fri Dec 28 21:31:11 2007
@@ -71,11 +71,16 @@
      if (standard.getDouble("estimatedNumPeople") == null) {
      standard.put("estimatedNumPeople", new Double("1"));
      }
-     plannedHours += standard.getDouble("estimatedDuration") / standard.getDouble("estimatedNumPeople");
+     if (standard.get("estimatedDuration") != null) {
+     plannedHours += standard.getDouble("estimatedDuration").doubleValue() / standard.getDouble("estimatedNumPeople").doubleValue();
+     }
      }
 
      } catch (GenericEntityException e) {
      Debug.logError("Could not updte task: " + e.getMessage(), module);
+     }
+     if (plannedHours == 0.00) {
+     plannedHours = new Double("24.00");
      }
      return UtilDateTime.addDaysToTimestamp(startDate, plannedHours / 8);
     }