Menu

#195 Rolled Up tasks don't use default duration units

closed-fixed
Jon Iles
None
5
2012-04-06
2012-03-03
No

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

Discussion

  • Nathaniel Marrin

    tDefaultDurationUnits patch

     
  • Jon Iles

    Jon Iles - 2012-03-05
    • assigned_to: nobody --> joniles
     
  • Jon Iles

    Jon Iles - 2012-03-05

    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.

     
  • Nathaniel Marrin

    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

     
  • Nathaniel Marrin

     
  • Nathaniel Marrin

     
  • Nathaniel Marrin

     
  • Nathaniel Marrin

    Zipped Project Sample File

     
  • Nathaniel Marrin

    I was wondering if you have had a chance to review the attached files and if you have any feedback.

     
  • Jon Iles

    Jon Iles - 2012-04-05
    • summary: MPP9Reader - Rolled Up tasks don't use default duration --> Rolled Up tasks don't use default duration units
     
  • Jon Iles

    Jon Iles - 2012-04-06
    • status: open --> closed-fixed
     
  • Jon Iles

    Jon Iles - 2012-04-06

    The code now in CVS fixes this issue.

     

Log in to post a comment.

MongoDB Logo MongoDB