The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Scriptrunner post function in workflow transition doesn't show custom field

Joeri Gydé
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2020

I created a multiline custom field and associated it with a create/view/edit screen of all issuetypes in my project.

I have a transition in a workflow with a post function triggering a scriptrunner script. The user is set to Initiating User. In that script I do following Unirest API call:

def issue = Unirest.get("/rest/api/latest/issue/${issueKey}?expand=customfield_12549")
        .header('Content-Type', 'application/json')
        .asObject(Map)
        .body

Assuming the expand keyword is optional.

The variable issue contains a map to the asked issue.  However the concerned costum field is missing in the data.

Strangely enough making the same API call in the Scriptrunner Console gives a data structure containing the wanted custom field.

What makes a possible difference between both calling situations?

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events