How to read & set default value for system field in jira application by using groovy script

Peruma Chinnasamy May 19, 2022

I am working in first time in groovy scripting in jira application.

I would like to know  which class and which method used to read the system field and which method is used to set the default value .

Example:- 

for custom filed will get the method for reading custom field  by using below given method

 "ComponentAccessor.getCustomFieldManager().getCustomFieldObject(custom_filed_id)"

 

Kindly share the input to me 

1 comment

Comment

Log in or Sign up to comment
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2022

Hi @Peruma Chinnasamy welcome to groovy.

getFieldManager and getCustomFieldManager are both methods in the ComponentAccessor class
Here's a link to the api docs.
ComponentAccessor 

Peruma Chinnasamy May 20, 2022

Hi craig

Thank you so much for your input.

I need to know one more thing which class and which method is used for setting the default value for system dropdown filed.

Eg: If project is xyz and issue type is story then I need to auto populate the value as "dropdown- value " for components field.

 

I don't know which class and which method we need to use to auto populate the value

Thanks and Regards 

peruma.C

TAGS
AUG Leaders

Atlassian Community Events