Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-12304

Object schema which contains import configuration from an uninstalled add-on cannot be deleted

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: (yes)

      Attempting to delete an Assets object schema, will be blocked with an error, if the Schema includes an Import Configuration for an Assets Integration, if the integration addon was uninstalled.

      Steps to Reproduce

      1. Install any Assets Integration free addon (e.g. NVD/CVE integration)
      2. Create a new schema, and configure an Import using the CVE integration
      3. Uninstall the CVE integration addon
      4. Navigate to Assets>Object Schemas and try to Delete this schem (confirm all warning dialogs)
      5. Optionally - try to Delete the Import configuration itself (same outcome)

      Expected Results

      The Schema is deleted

      Actual Results

      An error banner:

      "Assets import module with key insight-cve-import is not found. Is the import module still available?

      The Schema is not deleted

      ...
      

      Workaround

      Two optional workarounds, either will work:

      a. reinstall  the Integration module, delete the schema, uninstall the integration module

      b. Delete the import configuration from the DB, then the Schema can be deleted 

      Find the Import configuration ID, e.g. from the Process Results tab, or using:

      SELECT "ID" FROM "AO_8542F1_IFJ_IMPORT_SRC" WHERE "NAME" = <Import Configuration name>

      Then delete the respective Attribute maps (where nnn should be replaced by the Import configuration ID):

      DELETE FROM "AO_8542F1_IFJ_IMPORT_SRC_OTA" WHERE "IMPORT_SOURCE_OTID" IN (SELECT "ID" FROM "AO_8542F1_IFJ_IMPORT_SRC_OT" WHERE "IMPORT_SOURCE_ID" = nnn) 

      Object Type Maps (where nnn should be replaced by the Import configuration ID):

      DELETE FROM "AO_8542F1_IFJ_IMPORT_SRC_OT" WHERE "IMPORT_SOURCE_ID" = nnn

      And finally, the import configuration itself (where nnn should be replaced by the Import configuration ID):

      DELETE FROM "AO_8542F1_IFJ_IMPORT_SRC" WHERE "ID" = nnn

      Now you'll be able to delete the Schema

      SQL warning:
      Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first. Database modifications are not included in Atlassian Support Offerings

              Unassigned Unassigned
              8cdc82c96fd5 Yinon Negev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: