I have followed the example in https://scriptrunner.adaptavist.com/latest/jira/fragments/WebItem.html to create a custom dialog wired to a javascript.
Now, I would like to have two buttons in the dialog box, let's say "A" and "B" so that when A is pressed the endpoint /rest/latest//A is called, whereas when B is pressed the REST endpoint /rest/latest//B is called.
Could you provide me with some hints on how to achieve this?
Thanks.
You just need to wire it up with javascript.
Let's say you have used the example here: https://scriptrunner.adaptavist.com/latest/jira/fragments/WebItem.html#_dialogs_advanced
Your javascript might be something like the following (untested):
https://gist.github.com/jechlin/27993535f4e27ff5e3886dcf68268e3d
It has been a little bit more than a year since you posted this answer.
I just ran into a similar issue and your response from here helped solved it.
Hope its okay that I write an answer to my own question with the links you put in this response.
Thank you!
-Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.