Menu

#125 Task ID order when creating a projectfile is not correct

closed-fixed
Jon Iles
None
5
2011-04-04
2010-08-12
No

When creating a ProjectFile and adding tasks to it in a non-ordered way using Task.addTask or other methods to generate a hierarchy based on parent child relations, then the Task IDs won't get updated so that their order and OutlineLevel represent the parent child hierarchy.

Attached is an upgraded ProjectFile.synchronizeTaskIDs method with a recursive helper function synchronizeTaskIDsFromHierarchy that renumbers the tasks based on their parent child relationship when auto generation for task id and outline level are set to true.

Discussion

  • Lord Helmchen

    Lord Helmchen - 2010-08-12

    ProjectFile.java diff against r1.31

     
  • Jon Iles

    Jon Iles - 2010-08-16
    • assigned_to: nobody --> joniles
     
  • Jon Iles

    Jon Iles - 2011-04-04
    • status: open --> closed-fixed
     
  • Jon Iles

    Jon Iles - 2011-04-04

    Hi,

    I've taken a similar approach to your suggested patch - I've just rejigged the naming of a couple of methods which have slightly different purposes. Anyhow - there is a new method on the ProjectFile class called synchronizeTaskIDToHierarchy. If you create a task hierarchy programatically with various inserts into the child task lists, then call this method to sort out the task IDs before writing the results to a file.

    Jon

     

Log in to post a comment.

MongoDB Logo MongoDB