How to get all Country names in a single custom field ?

DevaKiran
Contributor
February 24, 2019

Hi Everyone,

I am using JIRA Service Desk Server 3.11.0 . I have scenario that, I have a custom field with name "Country" which is of "Drop Down" type. I don't want to enter the all country names manually.  For example i have 150 countries in the list, with one script those country names will display in the custom field.

Is there any script to get all the country names in the custom field?

 

2 answers

1 accepted

1 vote
Answer accepted
Nadine Schütt
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.
February 24, 2019

Hello @DevaKiran 

Another, non-script option I can think of is to create an excel sheet with 150 rows, the field Country as a column and each country in a row. When you import that into a plain Jira project (not your service desk directly), the new options should be added to the field. 

Please refer to the following article for further information: 

https://confluence.atlassian.com/jirakb/how-to-bulk-import-custom-field-values-for-certain-types-of-custom-field-827123935.html

Good luck

DevaKiran
Contributor
February 25, 2019

Thank you @Nadine Schütt .

The solution which you suggested is absolutely working. Thank you so much @Nadine Schütt 

But please suggest me how to do it with the script. 

Nadine Schütt
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.
February 25, 2019

Hello @DevaKiran 

Do you work with Script Runner? If so, there is a built-in feature for that referred to in the documentation: 

https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_bulk_import_custom_field_values#_bulk_import_custom_field_values

I have never used it myself but just looked at the feature in our local Jira and it looks pretty straightforward. 

Since I am not into scripting, I cannot offer any further advice on this, sorry.

Like DevaKiran likes this
0 votes
Kuba Nowakowski September 13, 2024

Will that work for Jira Cloud se well?

Suggest an answer

Log in or Sign up to answer