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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
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 

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