Suppose I have three projects: A, B, and C, with a hierarchy as follows: A -> B -> C. All these projects are linked to each other by linked issues: A is linked to B with a "relates to" relationship, and B is linked to C with an "is blocked by" relationship.
What I want is for B issues to be automatically marked as "Done" when C issues are marked as "Done." If this happens, A issues should also be marked as "Done."
How can I achieve this automation using Jira ScriptRunner?