How to safety delete custom fields in JIRA?

Jerrin Mathew April 14, 2016

I'm trying to determine the best approach in determining whether a custom field is inactive. My thoughts is if a custom field is not associated to any screen, it is inactive.

 

Is there anything else I should check for before proceeding to deleting the custom field? 

5 answers

2 votes
David Willox February 16, 2017
 I recently removed a field and used the below method.
  • Find existing values: filter all work items using an example field value.
  • determine the work item types using the data.
  • In the affected workflows, check for scripts and conditions/validators that use the field, removing or modifying these steps.
  • Does the data entered in work items itself need saving? Will the loss affect the workflows?
  • If yes perform bulk update on existing work items as identified in the filter to update a new appropriate field that can match the values from the old field (if the number of changes is large you may want to do this when fewer people are using the system and making changes as the update can eat up your system memory).
    • If no simply delete the field, re-index and run the integrity check and ignore the next 4 steps.
  • Re-index the system. When doing this be careful, depending on the number of items affected, the system load and your available system memory this may cause slowness or service outage for some users unless you are running a "Lock JIRA and Re-build" index.
  • Run a simple walk through test of the work items that were updated to make sure there are no issues.
  • Delete the custom field.
  • Re-index the system and then run the integrity check to fix any issues.
  • Notify users of the field change in case their private filters used this field and are now showing errors.
2 votes
Peter T
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.
April 14, 2016

Hi Jerrin,

there is no safe way to delete a custom field. For example if you delete it the JQL filters will be broken, workflow post-functions or scripts that might reference the field will still referencing it. Here is what we recommend - there is an free add-on that scans your configuration and tells you if something is broken, including filters - Integrity Check for JIRA. It does not cover every add-on that you might use in the workflows but covers the most popular.

So the procedure is the following:

  1. Delete the custom field
  2. Run Integrity Check for JIRA
  3. Fix all issues reported
  4. Run JIRA Integrity Checker

98% you are all set, unless you use some other than the supported add-ons.

Cheers,
Peter T

 

 

 

Xavier Burais July 1, 2020

Hi,

In addition, there is another plugin, still from botron soft, wich is usefull to know where a field is used (creen, filter, etc...): POWER ADMIN (free plugin)

I've automatically got it with "Configuration manager" (not free this one, but powerfull if you want to migrate a jira instance to another one) so I tried it and it is quite well done, and usefull.

If it could help some people, good for you! 

Xavier.

1 vote
Alexey Dorofeyev
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.
February 15, 2017

You can check field's values before deleting using Custom Fields Usage plugin

https://marketplace.atlassian.com/plugins/systems.npe.jira.cfu/server/overview

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2016

I'm not sure that "not on a screen" is quite good enough.  I'd use the JQL

<field> is empty

In a couple of filter statistic gadgets to see exactly how it's used (by project is a good one)

Fields can also be used in workflow functions, which is a bit of a pain to find.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2016

In the definitions it shows what screens, projects, and issues it's related to and you can figure out what projects would have it. Run a filter to look for it and issue id in those projects to see if it was ever used.

Suggest an answer

Log in or Sign up to answer