Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

ScriptRunner Cloud get issue parent


I understand that, in a Workflow scriptrunner post function, the issue object is available.

Can someone point me to the location of the documentation that lists all of the issue members and how to access them? (ie how to set a custom date field).

Specifically, I need to know :

  • how to find a sub-task's parent id
  • how to access a specific custom field in the subtask
  • how to get and update a custom field in the parent.


For example, to findd a custom field value, I see two approaches:


def customFieldId = fields.find { == 'Flight End' }.id as String 
def customFieldValue = (issue.fields[customFieldId] as Map)?.value


def inputFlightEndId = customFields.find { == 'Flight End' }?.id
def input1 = issue.fields[inputFlightEndId]


Which is correct?




Log in or Sign up to comment