PM tab - tasks - forcing the sort order you want

PM tab - tasks - forcing the sort order you want

philipfrench
Collaborator Collaborator
268 Views
0 Replies
Message 1 of 1

PM tab - tasks - forcing the sort order you want

philipfrench
Collaborator
Collaborator

This is just a "FYI solution" because I have seen a few customers asking this question.

 

You may notice that when your scripts are creating tasks with the same milestones, the display order of those tasks is not always the order that the script creates them in.

 

The displayed order is based on start date, but nothing further. So tasks with the same start date show are listed in random order.

 

If this is a problem for you, the solution can be to add a number of milliseconds to the start date of the first milestone in each task.

 

Here is the problem:

tasks appear in "random" ordertasks appear in "random" order

 

Here is the solution:

 

order1.jpg

 

In the task creation logic, you can pass in an extra counter (integer, 1,2,3... based on the order you want the tasks).

In this logic I am using "i" which is simply a counter when I read from the source grid. You can use your own counter:

order2.jpg

 

And now, when the milestones are created in the ON-CREATE script of the task, you simply add this number of milliseconds to the start date. You can see the existing logic commented out.

 

(Your on-create will probably have some variation on this. The field TASK_TEMP_INDEX is the hidden field that holds this counter):

 

order3.jpg

 

Hope that helps.

269 Views
0 Replies
Replies (0)