Menu

#224 [4.4.0] setMilestone() issue

v1.0_(example)
closed-fixed
nobody
None
5
2014-08-28
2013-07-25
No

MPXJ ver.4.4.0 incorrectly processes the attached file.
It mistakenly considers all its tasks as milestones.

I've made debugging and it looks like for attached file MS used another file format yet it still declared as MSProject 14.
I've made pretty simple patch and it looks working now. I've modified MPP14Reader class processTaskData() method this way:

        // HACK: if we have following bytes less than zero
        // then M$ uses another format version
        if (metaData[9] < 0 && metaData[10] < 0) {
            task.setMilestone((metaData[10] & 2) != 0);
        } else {
            task.setMilestone((metaData[8] & 0x20) != 0);
        }
1 Attachments

Discussion

  • Tiberiu

    Tiberiu - 2013-07-31

    The provided fix indeed solves the milestone problem.

    Tibi

     
  • Alex

    Alex - 2013-08-08

    Likewise - all the tasks are also have Roll-up flag set to True.
    The following change to the above code fixes that too:

     // HACK: if we have following bytes less than zero then MS uses another format version
         if (metaData[9] < 0 && metaData[10] < 0) {
             task.setMilestone((metaData[10] & 2) != 0);
             task.setRollup((metaData[12] & 0x08) != 0);
         } else {
             task.setMilestone((metaData[8] & 0x20) != 0);
             task.setRollup((metaData[10] & 0x08) != 0);
         }
    
     
  • Jon Iles

    Jon Iles - 2013-09-04

    This issue is now fixed by the latest code in Git - note the change in version control system!

     
  • Jon Iles

    Jon Iles - 2013-09-04
    • status: open --> closed-fixed
     

Log in to post a comment.