I am of course specifically referring to Script Runner.
I've seen lots of examples for looking at subtasks, and many examples of commenting on linked issues. I haven't seen a great example of accessing the parent issue and setting a comment there.
Use case
- I have a multi approval workflow using conditions and post-functions, as well as multi-user picker fields
- When the subtask is fully approved by all approval steps and people, this indicates a change in the parent issue.
- The parent issue should receive a comment along the lines of, "Change Request CR-1211 has been approved. Requirements may have changed."
Specifically, the issue has a Closed status and Close Issue transition. Ideally, the event fires as a post-function of Close Issue.