Changing custom field

Jan Scherks October 18, 2016

Hi,

I'm trying to change custom field type (single line to multi line) following this guide https://confluence.atlassian.com/jirakb/changing-custom-field-types-in-jira-158357.html - via Import CSV.

There are several issues during import:

  • there is no Key or Issue Key field to map original Key
  • when Summary field is left empty (by guide) importer just throws error message saying that Summary can't be empty

Have anyone experienced this issue?

 

Thank you

Jan

3 answers

0 votes
Jan Scherks October 20, 2016

Hi,

I managed to find where the problem is.

When I click on Issues > Import Issues from CSV I can't select Issue Key for mapping.

When I go thru Administration > System > Import & Export > External System Import > Import (CSV) the import wizzard is slightly different and I'm able to select Issue Key and import process is able to sucessfully finish.

So there are 2 CSV import wizzards. Strange.

Thank you for hinting other solutions.

 

Regards

Jan

0 votes
Peter Geshev
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.
October 19, 2016

Hi Jan,

You can try the db aproach as listed in the guide you listed

  • If you wanted to convert a Text-field Custom Field to a Free-text-field(unlimited text) Custom Field, first you need to change the data type from a stringvalue field to textvalue:
UPDATE customfieldvalue SET textvalue=stringvalue WHERE customfield=(SELECT ID FROM customfield WHERE
customfieldtypekey='com.atlassian.jira.plugin.system.customfieldtypes:textfield' AND cfname='Text Field');
  • Then, change the Custom Field type by updating the customfield table as below:
UPDATE customfield SET CUSTOMFIELDTYPEKEY='com.atlassian.jira.plugin.system.customfieldtypes:textarea', CUSTOMFIELDSEARCHERKEY='com.atlassian.jira.plugin.system.customfieldtypes:textsearcher'
where cfname='Text Field';

You could do that with the free plugin Home Directory and DB Browser for JIRA. Keep in mind that you will have to restart and reindex JIRA after that.

Regards,

Peter

0 votes
Mahesh S
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.
October 18, 2016

Please make sure you have exported the data with 3 columns- Issue key, Summary and the custom field. During the csv import map the key to 'Issue key' and it will be available. Thus, it will update the new custom field value alone. OR another choice is,

If you have script runner plugin-> Builtin scripts and copy the old single line custom field value to new multi line custom field as it is. Then, removing the old custom field as in the below screen shot.

image2016-10-19 15:15:28.png

Jan Scherks October 18, 2016

Hi Mahesh,

I followed the guide step by step

  1. export with 2 columns
  2. remove lines
  3. add empty Summary column

Trouble is that Issue key field is not available at all. I try to reindex JIRA.

Regards

Jan

Mahesh S
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.
October 18, 2016

Hope you opened the csv and edited. Did you used Microsoft excel for that? If yes, please import as Excel instead of CSV since the character coding differs for both.

It seems to be a problem with the csv format/alignment. Please cehck it with notepad++. However, reindexing may not help you now.

Suggest an answer

Log in or Sign up to answer