Workflow errors because a referenced custom field has been deleted

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

One or more workflow transitions throw errors about being unable to find a referenced custom field when the issue moves through the workflow.  This happens after custom field has been deleted.  

Diagnosis

Users may see error messages like either progressing an issue through it or when attempting to modify it:

1 <Workflow> did not find referred Custom field with key <key>

or 

1 Custom field id <key> does not currently exist in your Jira custom fields, but used to before it was deleted

Cause

At some point the referenced custom field was deleted but the workflow still points to it, causing errors when the appropriate transitions are triggered.

Solution

Since the workflow is known and the custom field ID is known, the easiest way to determine the transition where the field comes up is toexport the workflow as XMLand then search for the number of the customfield id in the XML file.

  1. Export your workflow to XML by going toAdministration⚙ >Issues >Workflows

  2. ChooseViewfor the appropriate Workflow

  3. Choose Export as XML from the next page.

  4. Open the XML file in your text editor of choice and search for the five-digit custom field ID.

  5. The individual transitions using it should be identified with <action> tags like below. For example, this is where a custom field (id 19152) is being used as a condition. In this example, we know that this custom field id refers to a custom field that was deleted.

    1 2 3 4 5 6 7 8 9 <action id="951" name="Emergency override" view="fieldscreen">     <meta name="jira.description"></meta>     <meta name="jira.i18n.description"></meta>     <meta name="jira.fieldscreen.id">10015</meta>     <restrict-to>       <conditions>         <condition type="class">           <arg name="class.name">com.atlassian.jira.workflow.condition.InGroupCFCondition</arg>           <arg name="groupcf">customfield_19152</arg>

    You can see that "customfield_19152" is within the <condition> tags for the "Emergency Override" <action> tags. The action corresponds with the workflow transition, so you're looking for the workflow transition named "Emergency Override" 

  6. Go back to the Workflow in Jira's UI and remove the offending reference from the workflow transition step.

Updated on March 14, 2025

Still need help?

The Atlassian Community is here for you.