Forums

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

How can i get this line of code to work in scriptrunner console

Tomas Gustavsson
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.
September 22, 2020

def myCustomField = issue.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_10006"))

I don't get how i shall declare "customFieldManager"

1 answer

1 accepted

0 votes
Answer accepted
Jorden Van Bogaert
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.
September 22, 2020

Hi @Tomas Gustavsson 

you can initiate a variable customFieldManager like this

def customFieldManager = ComponentAccessor.getCustomFieldManager()

Kind regards
Jorden

Tomas Gustavsson
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.
September 22, 2020

perfect, thanks. 

Like Jorden Van Bogaert likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events