set DEfault value for customfield via script/program

Nazia Tarannum
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.
January 7, 2014

I have some 300 fields & need to set default values for all.

Please sugggest a way, I checked for Jelly & rest api but to no avail.

I cant afford time to do it manually though

2 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 7, 2014

Unless you've got a good grounding in the Jira API and the script runner plugin installed, you're probably going to find that doing this by hand is going to be quicker than learning everything you need.

The script runner would at least allow you to convert 300 lines of "name of customfield" to 300 lines of "amend relevant field configurations"

Another dirty option might be direct SQL, but you'll have to work out the exact lines you need to insert to get the defaults into the right contexts, test them all in test, and remember to stop Jira and take a full backup before running the SQL.

As an aside - 300 customfields is almost certainly too many and you should be thinking about how to simplify, or split your Jira up.

0 votes
SuhailM January 7, 2014
Do u have sound knowledge on jira plugins?
Nazia Tarannum
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.
January 7, 2014

In plugins too, I didnt find any api to set default value. do you?

SuhailM January 14, 2014
Yes... you can use customfieldmanager to get customfield object n hardcode the default value in it..
Nazia Tarannum
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.
January 14, 2014

There is no api to set default, i checked. If you have then please let me know.

Suggest an answer

Log in or Sign up to answer