Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


ScriptRunner Behaviour: Get the value for a custom Field Parent Link on create and edit


Good day,

For a ScriptRunner Behaviour on a field change, I try to extract the values of a custom field Parent Link (key: com.atlassian.jpo:jpo-custom-field-parent).

I want to check if a value is already set in the create screen and if the issue is linked to a parent on the edit screen or if the field has a value in the edit screen itself.


So far I try to access the field like this:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField

def customFieldId = "customfield_14701"
def customField = ComponentAccessor.customFieldManager.getCustomFieldObject(customFieldId)

log.error('key: ' + customField.getCustomFieldType().getKey()) -> return com.atlassian.jpo:jpo-custom-field-parent
Thank you!

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Hauke Bruno Wollentin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Aug 15, 2023

I'm not sure if I understand the question correctly, but to get the value of that Custom Field you simply could use the Issue objects "getCustomFieldValue()" method (see )

issue is the binding variable in Behaviours, it can be used like

def customFieldId = "customfield_14701"
def customField = ComponentAccessor.customFieldManager.getCustomFieldObject(customFieldId)

def customFieldValue = issue.getCustomFieldValue(customField)
AUG Leaders

Atlassian Community Events