Is it possible to use script runner to transition a parent issue based on the status of a subtask?
Right now I have this setup
- A Request Issue type that needs to get an approval from 4 different people
- Script runner automatically creates 4 approval sub-task when the request is submitted
- When all the approvers mark the approval sub-task "Rejected" or "Approved", the parent automatically transitions to the correct status (Approved or Rejected) based on all the sub-task having a resolution
My problem is this. The parent should automatically move to the "Rejected" Status whenever 1 or more of the sub-task are marked "Rejected" but this does not happen. At this point, the parent only follows the "Automatically transition the parent" based on the last sub-task transitioned. The only thing I can do is prevent the parent from moving to the "Approved" status with a transition with a condition but I cannot force the parent to transition to the "Rejected" status
Any help would be appreciated.