Hi!
Today is the first time I try to created Dialog form with Scriptrunner.
I used this article to create what I want: https://www.adaptavist.com/blog/sending-data-from-jira-to-xmatters-gotta-scriptem-all-46/
(it's literally copy+paste, just add some function)
My case: custom button on the section "transition-all" that looks like transition, but add a dialog like "Are you sure?" and make transition only after pressing "Yes".
My problem is getting issue on that part (beginning):
showDialog() {
MultivaluedMap queryParams ->
String issueKey = queryParams.get("issueKey")
issueKey = trimIssueKey(issueKey)
String dialog = getDialogText(issueKey)
Response.ok().type(MediaType.TEXT_HTML).entity(dialog).build()
}
"queryParams.get("issueKey")" return null. I found some possible solution like getFirst("issueId") - also no result.
When I put issueKey as String (set the define key) everything works fine.
I tried to add that to look what queryParams return:
log.info("queryParams = " + queryParams)
And the result is:
queryParams = [_:[1592566326686]]
What am I doing wrong? Is there any other solutions to get issue or issueKey? (even URL)
Thanks for your attention.
I missed the part to make link that way:
/rest/scriptrunner/latest/custom/showXMattersDialog?issueKey=${issue.key}
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.