When a task is too big to be completed in one step, users will often break it down into smaller sub-tasks. When they then complete all sub-tasks they would normally have to manually transition the parent task to done. This workflow function automatically does this based on if all the tasks subtasks are set to resolved.
Put this post-function on the sub-task workflow, on transitions where the workflow could be set (typically toResolve Issue). If all sibling sub-tasks are resolved this will transition the parent issue using the provided action,which should be valid for the current step. If it's not valid, nothing will happen.