When i update a task start or end date, I want the Subgroups and super groups of the task to be updated to the latest start and end rt and end date

When i update a task start or end date, I want the Subgroups and super groups of the task to be updated to the Earliest start and latest End date.

I’m using API to get the data so i can manually write my database table.
I need to ensure that the start and end date of the task subgroup and super groups are updated to the earliest and latest.

I will need to get the data of all the siblings and parent of the task to the root, so i can update my table.

Currently, I’m only getting the current task data, and I’m manually searching for the subgroup and super group and then modifying with the earliest start date and latest end date. But this is not effective and prone to error as i can’t effectively determine this. I will appreciate if i can get the data as is correctly showing on the scheduler.

Any thoughts on this?

Below is the task data I’m getting

{“id”:1711022855973,“type”:“task”,“open”:false,“text”:“New task 2”,“start_date”:“2023-07-04T07:00:00.000Z”,“duration”:9,“parent”:“1711022855947”,“user_id”:0,“progress”:0,“end_date”:“2023-07-15T07:00:00.000Z”,“$no_start”:false,“$no_end”:false,“$rendered_type”:“task”,“$calculate_duration”:true,“$effective_calendar”:“global”,“$source”:[],“$target”:[],“constraint_type”:“asap”,“$rendered_parent”:“1711022855947”,“$level”:3,“$local_index”:1,“$open”:false,“$expanded_branch”:true,“$resourceAssignments”:[],“$index”:7}
"
Any thoughts on this.

Hello Opeyemi,
We received your question in the support system. Let’s continue our discussion via email.

Alright thanks. Looking forward to it