Timeline for Unable to match a subtasks to its parent tasks REST API
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 15, 2021 at 11:00 | comment | added | Ganesh Sanap - MVP | great, glad it worked for you. | |
Feb 15, 2021 at 10:50 | comment | added | martinbshp | Ganesh. Thanks for the solution. I realize now that the Parent task has an ID but I was not pulling that from the list. After pulling in the ID for all the list items I can match the ParentID from subtask to ID from maintasks. | |
Feb 15, 2021 at 10:48 | vote | accept | martinbshp | ||
Feb 12, 2021 at 14:14 | comment | added | Ganesh Sanap - MVP |
That's why you have to loop through both arrays and compare ID from mainTasks (not ParentID) with ParentID.Id in subTasks. ParentID.Id from subtask is always equal to the ID of it's Parent task.
|
|
Feb 12, 2021 at 13:16 | comment | added | martinbshp | Ganesh thank you very much for your feedback. However, the mainTasks do not have a ParentID.Id only the subTasks do. So, if there is a subTask with ParentId of 32 there is no way to find the Parent Id that corresponds with 32. | |
Feb 12, 2021 at 11:53 | comment | added | Ganesh Sanap - MVP |
You can loop these two arrays and match ID from mainTasks array to ParentID.Id from subTasks array.
|
|
Feb 12, 2021 at 11:25 | comment | added | martinbshp | Also, in your code you end up with two different lists (mainTasks, and subTasks) with no apparent relationship. So, for any task in mainTask how do you know which sub task in subTasks belong to it? | |
Feb 12, 2021 at 10:03 | comment | added | martinbshp | How do you know what parents have which children. For example, if a subtask has a ParentID of 32. How can I find that Parent task? | |
Feb 12, 2021 at 9:40 | history | answered | Ganesh Sanap - MVP | CC BY-SA 4.0 |