Hi,
Does anyone know how to do the below scenarios:
1. When the 1st Task transits from Priority to WIP, it automatically transits its parent to In Progress.
2. When the last child issue moves to Done, close the whole Epic
.
In our project, we have 3 hierarchies - Initiative (1st ), Epic (2nd), and Task (3rd); their relationship can be referred to in the attachment below.

The problem I encountered is:
When one of the Epic is closed by the automation (Scenario 2), the Initiative will be affected by this automation and transit itself to Done even if it has the Epic (child) in In Progress status.
How can I avoid this problem, and what adjustments can I make to my automation?
Thanks!