Forums

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

Reuse exisiting custom field name but with different type

Gian Israel Nampi
Contributor
November 8, 2021

Hi Atlassian Community,

 

I need to change/convert an existing custom field type from "Text Field (Single Line)" to "Text Field (multi-line)" as mentioned in the documentation How to change custom field types in Jira

  • 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';

I am not really sure if this is related to the "Text Field" type so I am thinking if it's safe to just create another custom field type that uses the same name of that custom field? will it affect the current field after the new field is created?

After that, I will bulk edit to transfer the current values to the new field.

 

Thank you.

1 answer

1 accepted

1 vote
Answer accepted
Antoine Berry
Community Champion
November 8, 2021

Hi @Gian Israel Nampi ,

As stated in the KB, atlassian incentivises against changes in the database.

You should indeed create a new custom field with the same name. After the data transfer, remember to update your screens / filters / dashboards to display the new field instead of the old one.

Gian Israel Nampi
Contributor
November 19, 2021

Hi @Antoine Berry

Thank you for your response, so I created the custom field with the same name and migrate the existing values to the new one using Adaptavist Script Runner - Built-in Scripts.

 

Thank You!

Like Antoine Berry likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events