Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy a custom field definition, changing field type but keeping the allowed values

Amir Katz (Outseer)
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.
March 24, 2018

I defined a custom field, Customer Name, of type Select List (single choice), and defined, manually, 140 values for the choice.

I need to define another custom field, Other Affected Customers, with type Select List (multiple choices) using the same list of 140 values.

What I see is that once a custom field is defined, you cannot change its type, so this rules out the option of copying the first field to a new one.

Any idea? Thanks

2 answers

1 accepted

0 votes
Answer accepted
Amir Katz (Outseer)
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.
March 26, 2018

What I actually did is this (sounds complicated, but it's not):

  1. Created the two custom fields
  2. Created a CSV file for System Import for first field (Customer Name)
  3. Performed a system import, specifying the first custom field, which generates a dummy issue (with key=PROJ-1), and adds all 140 values to the custom field
  4. Modified the CSV file to use another issue (key=PROJ-2)
  5. Ran the import again, use the modified CSV file, but specifying the 2nd custom field. This adds another dummy issue (key=PROJ-2), and populates the values for the 2nd custom field.
  6. Delete the two issues (or mark them as rejected, obsolete, whatever).

 

Note that for cascade select list, the value should be "FIRST -> SECOND" (the single spaces around the '->' are mandatory!)

The import process is explained here: LINK

1 vote
Nic Brough -Adaptavist-
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.
March 25, 2018

There is no copy function, fields are expected to be different, so no-one has written anything that would do this.

You could find a scripting add-on that could run a one-off script to duplicate all the options into the new field, but actually, it's likely to take you a lot longer to write the script than it would to trudge through typing the duplicates in.

Darren Jansen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 25, 2021

We do translations, so we need "Source Language" and "Target Language" with identical lists of languages. Looks like I'll have to paste them in one-by-one two times. 😫

Like Jerome Baart likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events