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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events