Hello,
I would like to create a dialog screen.
Can anyone send a template to it?
Thank you,
Daniel
Hi @Dan27
In what context do you want to add a dialogue screen? For example, is it during a workflow transition? Or?
Ste
Just from a fragements button. with "bla bla" text. something simple.
I try to do it and the dialog opens in a blank page. attached pics of the fregments screen and the "dialog" blank page.
This is my rest endpoint code:
import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegateimport groovy.transform.BaseScript
import javax.ws.rs.core.MediaTypeimport javax.ws.rs.core.MultivaluedMapimport javax.ws.rs.core.Response@BaseScript CustomEndpointDelegate delegate
doSomething { MultivaluedMap queryParams ->
// get a reference to the current page...// def page = getPage(queryParams)
def dialog ="""<section role="dialog" id="sr-dialog" class="aui-layer aui-dialog2 aui-dialog2-medium" aria-hidden="true" data-aui-remove-on-hide="true"><header class="aui-dialog2-header"><h2 class="aui-dialog2-header-main">Some dialog</h2><a class="aui-dialog2-header-close"><span class="aui-icon aui-icon-small aui-iconfont-close-dialog">Close</span></a></header><div class="aui-dialog2-content"><p>This is a dialog...</p></div><footer class="aui-dialog2-footer"><div class="aui-dialog2-footer-actions"><button id="dialog-close-button" class="aui-button aui-button-link">Close</button></div><div class="aui-dialog2-footer-hint">Some hint here if you like</div></footer></section>"""
Response.ok().type(MediaType.TEXT_HTML).entity(dialog.toString()).build()}
This is my fragements script: (attached pic of the dragments screen):import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.Issue;
return (issue.getIssueType().name=='Bug-Internal')
'Navigate to a link'Link: /rest/scriptrunner/latest/custom/doSomething?issueId=$issueId&issueKey=$issue.getKey()
It looks like you're new here. Sign in or register to get started.