It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

ScriptRunner Cloud get issue parent Edited

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 { it.name == 'Flight End' }.id as String 
def customFieldValue = (issue.fields[customFieldId] as Map)?.value

and


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

 

Which is correct?

Thanks!

0 comments

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you