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.CustomEndpointDelegate
import groovy.transform.BaseScript
import javax.ws.rs.core.MediaType
import javax.ws.rs.core.MultivaluedMap
import 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.ComponentAccessor
import 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()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.