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

0 votes
Accepted answer

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.

0 votes

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
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

808 views 3 9
Read article

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