Menu

#56 Duplicate task in file.getChildTasks() when opening mpx

closed-fixed
Jon Iles
None
5
2008-10-29
2008-03-25
No

When I open following MPX

MPX,Microsoft Project for Windows,4.0,ANSI
10,$,1,2,",",.
11,2,0,1,8.000,40.000,$10.00/h,$15.00/h,1,0
12,1,0,480,/,:,am,pm,20,20
20,Kalendarz bazowy planu,0,1,1,1,1,1,0
25,1
25,2,08:00 am,12:00 pm,01:00 pm,05:00 pm
25,3,08:00 am,12:00 pm,01:00 pm,05:00 pm
25,4,08:00 am,12:00 pm,01:00 pm,05:00 pm
25,5,08:00 am,12:00 pm,01:00 pm,05:00 pm
25,6,08:00 am,12:00 pm,01:00 pm,05:00 pm
25,7
30,Project1,,,Kalendarz bazowy planu,25/04/2008,25/04/2008,0,25/03/2008,,$0.00,$0.00,$0.00,0h,0h,0h,0%,0d,0d,0d,0%,,,,,0d,0d
60,Name,WBS,Outline Level,Duration,Start,Finish,Constraint Date,Fixed,ID,Constraint Type,Unique ID,Outline Number
61,1,2,3,40,50,51,68,80,90,91,98,99
70,(bez nazwy),1.0,1,480m,25/04/2008,25/04/2008,25/04/2008,Yes,1,As Soon As Possible,1,1.0

using mpxj (this mpx was saved using mpxj)
file.getChildTasks().size() returns 2
and in this collection there is 1 duplicate task.

By the way - when I try to open this file using Microsoft Project 2003 it shows up warning about security and legacy file formats. I am not sure if this is issue related to some bug in this mpx or it is normal behavior.

Discussion

  • Marcin Kosieradzki

    Logged In: YES
    user_id=1619676
    Originator: YES

    I have noticed that this is probably duplicate to: 1076713, which was closed as unable to reproduce ;) so here is reproduction.

     
  • Jon Iles

    Jon Iles - 2008-03-26

    Logged In: YES
    user_id=150730
    Originator: NO

    Hi,

    I think that this has been caused by the lack of an outline level in the file. I'm guessing that you've created this file programatically using the MPXJ API? I'd suggest setting the "auto outline level" and "auto outline number" properties to true on the ProjectFile instance to get these values generated automatically. Have a look at the MpxjCreate sample class to see the range of other settings I'd recommend using when generating a project file from scratch.

    Hope that helps!

    Jon

     
  • Jon Iles

    Jon Iles - 2008-03-26
    • assigned_to: nobody --> joniles
    • status: open --> closed
     
  • Marcin Kosieradzki

    Logged In: YES
    user_id=1619676
    Originator: YES

    Thanks for your response

    It was created using following settings... I took those settings from your example...

    file.setAutoTaskID(true);
    file.setAutoTaskUniqueID(true);
    file.setAutoCalendarUniqueID(true);
    file.setAutoResourceID(true);
    file.setAutoResourceUniqueID(true);
    file.setAutoOutlineLevel(true);
    file.setAutoOutlineNumber(true);
    file.setAutoWBS(true);

     
  • Jon Iles

    Jon Iles - 2008-03-28

    Logged In: YES
    user_id=150730
    Originator: NO

    I've re-opened this one to take another look.

     
  • Jon Iles

    Jon Iles - 2008-03-28
    • status: closed --> open
     
  • Jon Iles

    Jon Iles - 2008-10-29

    Hi,

    the code now in CVS contains a fix for this problem.

    Jon

     
  • Jon Iles

    Jon Iles - 2008-10-29
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB