JMWE - callJira - how to store response?

Mateusz April 18, 2021

Hello :)

I want to use JMWE filter - callJira for creating a new Jira Service Desk issue but I need also store response from API which is represented as JSON object with dump filrer. How can I do that and store somewhere response from Jira API with using Build-your-own (scripted) Post-function? Maybe you know better way to do that. Thank you for your time :)

1 answer

1 accepted

1 vote
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2021

Hi @Mateusz ,

why do you need to use callJira to create a JSD request? Can't you just use the Create Issue(s) post-function for that?

Mateusz April 18, 2021

@David Fischer 

when I use Create Issue(s) post-function I can't set Customer Request type which is necessary for request to being viewable for Customer from Service Desk Portal :(

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2021

But you can. You just need to add the Customer Request Type field under the "Set fields of new issue" section:

image.png

Like Mateusz likes this
Mateusz April 18, 2021

Thank you for that hint David :)

Probably I suggested known problem with no option for update Customer request type field in Set field value post-function and I thought that the same problem appears in Create Issue(s) post-function. This will solve my problem but I am still curious that there is answer to my first question?

Anyway, thank you @David Fischer  :)

Like David Fischer likes this
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2021

Yeah, on Jira cloud, the Customer Request Type can only be set during the creation of the request, not after. Hence the limitation.

As for your initial question, I'm not sure I understand it. What exactly do you want to store (and where)? The callJira call, in your case, would return a full customer request object, what do you want to do with it? You can store it in a local variable:

{% set newRequest = "/rest/api/2/issue" | callJira(verb=("post"), ...) %}

and then you can access any attribute of that object.

Like Mateusz likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events