Change Custom Fields Type

Could I change a custom field type ? for example from "Number Field" to "Text Field" ?

Or how could I import the data from the old filed to the new one ?

2 answers

1 accepted

This widget could not be displayed.

Yes, it can be done. Steps:

0. Add the new CF

1. Ensure you have exclusive acess to JIRA

2. Install JJupin

3. Add the SIL runner on the dashboard and run the following script

string [] keys = selectIssues("project = PRJ");

for(string k in keys) {

//assign new to old value, possible with conversion. Error treatment is your responsibility

%k%.customfield_1234 = %k%.customfield_54321;


4. Run it

5. (optional) If you have many issues, go out and have a cup of coffee, smile at the sun

6. Uninstall JJupin (or buy it)

7. Delete the old field if unused anymore

Note: I did not tested the above, and anyway you're adviced to do backups and test it first; don't do it in production directly.

This widget could not be displayed.

As far as I am aware, it is not possible to "directly" import field values from one field to another, nor is it possible to change the type of an existing custom field.

One option would be to make use of the "Copy Value From Field to Field" post function.
This would mean you will have to create transitions in your existing workflows, pointing from the current status back to itself. In this transition, you use the "Copy Value From Field to Field" to set the values to the new field. Once all fields have been adjusted, the old field can get removed, as well as the transactions.

Depending on the amount of different statuses of issues of which you will need to change the fields of, this might be a lot of work. Alternatively, you could look into trying to copy the value of the fields over in the database, however I would advice against doing this, or at the least perform this in a test environment first before doing this in a production environment. At all times ensure you have backups of your production environment when making changes like this.

The JIRA documentation says otherwise: Unfortunately the documentation isn't accurate as it is.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

281 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you