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!