Rolled Up tasks don't use default duration units
Multi platform library to read and write schedule data
Brought to you by:
joniles
Using MPXJ 4.3.0 when a task duration is auto calculated from the sub-tasks below it
switch (type & DURATION_UNITS_MASK) // MPPUtility.java line 745
results in case 21 : // duration in days of a recurring task and returns units = TimeUnit.DAYS;
However getDefaultDurationUnits() correctly reports hours as the default unit.
The attached patch removes case 21 along with default, returns null and then uses the project default duration unit in FieldMap.java
Please let me know if you see anything wrong with this. It seems to correct the issues I am having with my project file
tDefaultDurationUnits patch
Could you send me a simple test case please? The change to MPPUtility.getDurationTimeUnits has wider implications - the result of that method is used in a number of places, which do not expect to receive a null value.
Joniles,
I will attached the .mpp file, sample output from 4.3.0 along with the sample output from the patch and a diff of both output files.
I also wanted to note that at some point this method must have returned null as I only changed the default of hours to the project setting default in the null case.
Since this change is not consistent with the other use cases if you have sample files for those I would be happy to make wider changes if I have to.
Thanks
Nate
Zipped Project Sample File
I was wondering if you have had a chance to review the attached files and if you have any feedback.
The code now in CVS fixes this issue.