In this example we will create a new Dialog inside Jira using Scriptrunner, a little bit of HTML, Groovy and Javascript.

First we will create 2 REST Endpoints (one to show the Dialog and another one to show a HTML page with the results of the action).

Custom REST EndPoint: showDialogExample (example code extracted from this link)

Note in this example of Dialog XML in the “form” tag there is an “action” attribute to send the params by URL to the next Jira custom REST endpoint.

Custom REST Endpoint: showDialogExampleResult

Note in this example we use queryParams.getFirst() method to obtain the params. As result we will show an HTML full page with a response text with all the params collected.

Let’s create the last part (the Web Fragment to show a button in the Issue in order to call the new Dialog REST Endpoint)

Ok that’s all! In summary we have 2 REST Endpoints and 1 Fragment.

Ok! Let’s do a test! Go to some Issue of your Jira system

Click in More button –> Dialog Test MrAddon

And just click “Confirm”! Now we will see the values selected in the new response page. Easy!

By MrAddon


Posted by:.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s