How to deal with leftover app custom fields that cause export errors
Problem
We’re using Xray as an example for this use case.
When attempting to export a Jira project using the Project Configurator app, users encounter the following error:
Found custom field with values for issues in exported project(s), with id: xxxxxxx, name: Manual Test Steps (Export) and type: com.xpandit.plugins.xray:manual-test-steps-export-custom-field. This field does not exist. Check if its type is defined in a plugin that has been disabled.
Despite the fact that the Manual Test Steps (Export) custom field was not present in the Jira instance, the error persists. This affects the export process of projects using the Xray plugin, a popular test management app for Jira.
Screenshots
Symptoms
An error message indicating a missing custom field (Manual Test Steps (Export)) during project export, as shown above.
Jira does not recognize the custom field type manual-test-steps-export-custom-field.
The error only occurs when exporting projects associated with Xray, but not for others.
The field was not visible in the Jira custom field configuration UI.
Root Cause Analysis
The issue traces back to a potential inconsistency with the Jira custom field data related to an older version of the Xray plugin. The custom field Manual Test Steps (Export) is a leftover from a previous Xray version that might have been removed or upgraded. However, residual references to this custom field remain in the database, causing the error during export.
Key findings include:
The custom field is not visible in Jira's custom field list, suggesting that it is no longer actively used.
The Xray app, used in various projects, does not recognize the custom field after version 4.0.
Querying the Jira database reveals the existence of the field's references, but it cannot be deleted through Jira’s UI or the standard API methods.
Resolution
Step 1: Object Dependencies Report
Run the Object Dependencies Report to identify any remaining references to the custom field or other configuration inconsistencies in the source Jira instance. Fix all reported issues before attempting another project export.
Step 2: Database Query
The custom field must be removed directly from the Jira database, as it cannot be deleted through Jira's UI or API. Execute the following SQL queries to remove the custom field and its values:
Query to find the custom field:
SELECT * FROM CUSTOMFIELD WHERE ID = xxxxx;
Query to find related custom field values:
SELECT * FROM CUSTOMFIELDVALUE WHERE CUSTOMFIELD = xxxxx;
Query to delete custom field and values:
DELETE FROM CUSTOMFIELDVALUE WHERE CUSTOMFIELD = xxxxx;
DELETE FROM CUSTOMFIELD WHERE ID = xxxxx;
Step 3: Reindex Jira and Restart
After deleting the field from the database:
Restart Jira to apply changes. Refer to https://confluence.atlassian.com/adminjiraserver/start-and-stop-jira-applications-938847802.html
Perform a full Jira reindex to update the Jira search index with the latest data. Refer to Reindexing Jira
Step 4: ScriptRunner Script (Optional)
If the error persists after removing the field, confirm whether the custom field still exists in Jira by running the following script in ScriptRunner:
import com.atlassian.jira.component.ComponentAccessor
ComponentAccessor.customFieldManager.getCustomFieldObject(xxxxx)
This script checks if the custom field with ID xxxxx is still present in the system.
Conclusion
The custom field error is resolved by deleting outdated references from the Jira database and reindexing the instance. This process highlights the importance of maintaining clean data and regularly updating apps like Xray to prevent legacy configuration issues from interfering with system operations.
For similar issues, users are encouraged to:
Run Object Dependency Reports before exports.
Ensure that custom fields are correctly managed and removed if no longer in use.
Keep Jira and related apps up to date to avoid compatibility issues.
For further assistance or recurring issues, contact Xray Support.