Expand my Community achievements bar.

SOLVED

Nesting child tasks under parent tasks using Fusion

Avatar

Level 10

Hi Fusion Community,

 

Does anyone know if there's a way using Fusion to automate the process of associating child tasks with parent tasks?

 

  • I'm iterating through a project to get all of it's tasks
  • I'm then creating a new project and tasks based on the above iteration (essentially copying a previous project and it's tasks)
  • Through the above iteration of tasks on the original project, I've outputted the parentID field.  Am I able to use this information to ensure the new child tasks added to the new project are nested under the correct parent tasks?

Thanks!
Nick

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

This is doable, but I've only ever done it in not-Fusion.

 

There are a couple of ways I can think of to do it in Fusion. Probably the easiest way I can think of would be this.

  1. Create a custom form, and put a text field to store the original task ID, and the original task's parent task ID
  2. Create all of your new tasks, but attaching your custom form and writing the original task ID and the original parent task ID
  3. After all of your new tasks are created, do a search for all tasks in your new project that have a value in the original parent task ID field
  4. Iterate thru that list, and group them by the original parent task ID field
  5. Once you have them grouped, for each grouping then...
  6. Do a search for the task with the original task ID field equal to the grouping's parent task ID to get the new task ID
  7. Iterate thru all the tasks in your grouping
  8. Update the grouped task's parent ID to the task ID found in 6, and null out the original parent task ID (the nulling is just so you know you've already processed that task, otherwise it's unnecessary)
  9. (Optional) Remove your new custom form

I think that should work. There are a couple other ways you could do it without the custom form, but this feels like the easiest way, I think.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

This is doable, but I've only ever done it in not-Fusion.

 

There are a couple of ways I can think of to do it in Fusion. Probably the easiest way I can think of would be this.

  1. Create a custom form, and put a text field to store the original task ID, and the original task's parent task ID
  2. Create all of your new tasks, but attaching your custom form and writing the original task ID and the original parent task ID
  3. After all of your new tasks are created, do a search for all tasks in your new project that have a value in the original parent task ID field
  4. Iterate thru that list, and group them by the original parent task ID field
  5. Once you have them grouped, for each grouping then...
  6. Do a search for the task with the original task ID field equal to the grouping's parent task ID to get the new task ID
  7. Iterate thru all the tasks in your grouping
  8. Update the grouped task's parent ID to the task ID found in 6, and null out the original parent task ID (the nulling is just so you know you've already processed that task, otherwise it's unnecessary)
  9. (Optional) Remove your new custom form

I think that should work. There are a couple other ways you could do it without the custom form, but this feels like the easiest way, I think.