Forums

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

Having issues with a specific customFieldManager method call in Scriptrunner, ".findByName()"

Marty Roger
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!
August 21, 2020

I have limited experience with programming, usually just enough to cannibalize scripts that are similar to what I'm working on to get what I need done. I've been trying to create a scripted field to display the value of custom fields from subtasks in the parent task. Using this page, I grabbed the import statements at the top and the line


def customField = ComponentAccessor.customFieldManager.getCustomFieldObjects(firstSubtask).findByName(customFieldName)


I've been doing my best to learn as I go, and for the most part hitting Ctrl + J to bring up the javadoc has been really helpful. However, I can't seem to find anything anywhere, be it google, here, or the adaptavist library, about "findByName()". I'm not quite sure how it works, and would really appreciate if someone could give me more information about where it comes from.

1 answer

0 votes
Ferenc Nagy [Midori] January 25, 2021

It should be an additional feature by ScriptRunner. Maybe something like this?
https://en.wikipedia.org/wiki/Grails_(framework)#Methods

Suggest an answer

Log in or Sign up to answer