Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,414
Community Members
 
Community Events
165
Community Groups

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

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

Craig Nodwell Community Leader 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 

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

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