How to add 3000 plus options to the custom field

Sravan Muppavarapu September 7, 2022

I have a requirement, where I have to add more than 3000 option values to a custom field. How to do that. 

Can we do using a script runner plugin?

 

 

4 answers

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

Hi @Sravan Muppavarapu,

Welcome to Atlassian Community!

You could use the REST API to do this and Scriptrunner should work too, but you should really consider it you want to add those 3000 plus options. The select field doesn't have a hard limit, but you will run into performance issues, see this question.

Another option would be to use an external data source and an app like Elements Connect, I used that when I was on Data Center and we needed to add a field that had 10000+ part numbers.

Sravan Muppavarapu September 7, 2022

Hi Mikael,

 

Thanks for the response. My situation is also the same. these 3000 options are like apart names and numbers.

To overcome the performance issues, can I update 400 values every day or something like that?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

No, your issue is that you will run into performance issues when someone will try and use the field. I would consider using an external data source, or if you have access to Insight use that instead because the field values are populated when the user is typing in the field instead of having to wait for the list to first populate before you can see them. And by using external data source or Insight you can easily maintain the list rather than having to do it from the custom field.

Like Sam Nadarajan likes this
Sravan Muppavarapu September 7, 2022

okay. I will try it. Already that custom field had 2400 options and these 3000 values are added to it.

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.
September 7, 2022

To add to @Mikael Sandberg 's advice, you should be aware that humans struggle with most lists longer than about 42 items.  Cloud Jira actively limits the number offered.  Your 5400 list is unlikely to be of any practical use - you will find that if humans are using the field rather than automation, it's mostly full of random junk.

Like Mikael Sandberg likes this
Sravan Muppavarapu September 7, 2022

This field is updated by automation. I mentioned previously this field had 2400 already and it was updated by automation.

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.
September 7, 2022

Yes, you did, but how you've ended up with way too many options for your people is not important.  The point is that your field is probably useless to your people.

Like Mikael Sandberg likes this
Jamie Echlin _ScriptRunner - The Adaptavist Group_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 8, 2022

Also consider ScriptRunner database fields - https://docs.adaptavist.com/sr4js/latest/features/script-fields/built-in-script-fields/database-picker

It will lazily load values as the user types, they could be stored in an external database, or a csv/excel file etc.

Like Mikael Sandberg likes this
Sravan Muppavarapu September 8, 2022

@Nic Brough -Adaptavist- By the time I joined the organization It had already been added to the field. So No idea.

Sravan Muppavarapu September 8, 2022

Hi All,

 

Thank you all for the responses and suggestions. I successfully completed this requirement and updated 3000+ options to the custom field using CSV file import.

 

Thank you

Sravan

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.
December 14, 2023

@jagadesh.e 

The usual procedure (for rendering your field utterly useless - please see the points made about usage above), is to

  • create a CSV sheet with all the entries you need
  • it needs two columns, but you don't need to think about the values, the first column can be a copy of the second
  • the first line should read "summary, field name"
  • create a Jira project dedicated for this (so give it a key you are unlikely to reuse and permissions that only Jira admins can use it)
  • configure the project so that it has no mandatory fields, and includes the field you want to import options into
  • import the CSV file into the project, with settings:
    • Map summary column to summary
    • Map the field column to the field you want to add the options to
    • Select "create new options"

This will create thousands of issues in your project, each with the custom field set to a new imported value.

Note that you may have to do this in batches, some versions of Jira can only handle 1000 imported issues at a time.

0 votes
jagadesh.e December 13, 2023

@Sravan Muppavarapu could you please tell me the process how you did it through CSV. I have the same requirement.

 

Thank you,

Jagadesh

0 votes
Juliette Lallement _Elements Apps_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 8, 2022

Hi @Sravan Muppavarapu 

I am the Product Manager of Elements Connect

Elements Connect allows you to do that. If you would like to discuss your use case or have any further questions, feel free to book a call to my Calendar.

 

Best regards

Suggest an answer

Log in or Sign up to answer