This article explains how to transition the issue based on the custom field value using Transition issue post function.
Usecase: Based on the custom field Question value “yes” or “No” the transition of the current issue happens. If the selected value is Yes then the issue will go to Review status and if the value is selected as No then it should go to Done status.
Instructions
Navigate to the desired workflow transition and add the Transition Issue post function.
Add the target transition Id of the specific workflow and custom field Id based on your Jira instance.
Enter the below Condition Execution which will make sure to execute the post function when this condition is true.
Add this complete post function.
Publish the workflow and execute the scenario.