Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

QueryParams dont return issueId

Tatyana Lukyanchikova
Contributor
June 19, 2020

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.

1 answer

0 votes
Tatyana Lukyanchikova
Contributor
July 23, 2020

I missed the part to make link that way:
/rest/scriptrunner/latest/custom/showXMattersDialog?issueKey=${issue.key}

Suggest an answer

Log in or Sign up to answer