Skip to end of banner
Go to start of banner

How to fix Integrity Check violation for reference to missing custom fields from the Database

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This article explains how to fix the Integrity Check violation for reference to missing custom fields from the Database.

Problem

Deployment fails with an error “Unable to perform deployment: Unable to apply change 'type: removal, object: JiraCustomField#DMP 11. What metadata standard will be used?_com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons, target object: JiraConfigurationRoot#root, feature: customFields'

Example code error

java.util.concurrent.ExecutionException: com.botronsoft.jira.rollout.snapshot.SnapshotOperationFailedException: Unable to perform deployment: Unable to apply change 'type: removal, object: JiraCustomField

This issue happens when restoring a configuration at the time of deployment from the source Jira to the target Jira, including the deletion of some custom fields that are still in the target environment but shouldn't be (as they have been deleted in production).


When doing the restore configuration action, Configuration Manager is unable to finish the deployment because errors occur when a custom field is deleted.
Instructions

Solution

  1. Perform a cache refresh from CMJ's advanced page.

  2. Execute the following DB query when replacing %MISSING_CUSTOM_FIELD_ID with the missing CustomFied ID from the Integrity check for Jira

    SELECT * FROM AO_54307E_VIEWPORTFIELD as field inner join AO_54307E_VIEWPORTFORM as form ON field.form_id = form.id where field_id = '%MISSING_CUSTOM_FIELD_ID'
  3. With the above-mentioned DB query, you can have a better view of the request types that have reference to the missing custom fields if there are any. 

    After that, these references must be deleted from the AO_54307E_VIEWPORTFIELD table using their table id.

  4. Perform a Database backup before performing an UPDATE or DELETE query.

  5. Running the below query, by replacing the placeholder with the database id of the custom field, will delete the reference.

    DELETE FROM AO_54307E_VIEWPORTFIELD where ID =%
  6. After the Database manipulation cache refresh from CMJ's advanced page must be triggered. 

  7. After that, run an integrity check for Jira again.

As a general precaution, before any direct database update, it is recommended to take a database backup. After the update, run a cache refresh for the changes to take effect (this can be done from CMJ's Advanced page)

  • No labels