I have Jira with ScriptRunner.
I have a Request issue type and an Approval issue type. Multiple approval issues are related to a request issue. This represents multiple approvals for the request.
The user for each approval could click on the linked approval issue and then click the appropriate transition which prompts for a comment.
However I'd like to make it a little easier for users that aren't used to Jira. I'd like there to be "Approve" and "Reject" buttons at the top of the request issue type that will execute the appropriate transition on the related issue AND prompt the user for the comment like they normally would if following the transition manually.
I have figured out how to get ScriptRunner to add an additional button to the top of the Jira view screen. I can also make this button conditionally visible based on the logged in user and the linked approval issues.
What I haven't figured out is if there is a way have that button execute the transition in the related ticket and prompt for the comment. I did find that if I paste the link for the button on the approval issue into my browser window I can get the comment dialog to show up. However putting that link into a web panel that doesn't appear to work.
Anyone have ideas on how to execute this transition?
Alternatively I could prompt for the comment in a dialog that comes up from the custom button and then execute the transition on the back end. However I haven't figured out how to add an input field to the custom dialog and capture it's output yet.