NULL value in a database column causes "JCMA - Migrate all at once" to fail during the "Processing plugin data" task

XMLWordPrintable

    • 2
    • Minor

      Issue Summary

      JCMA's Migrate all at once feature (MAO) performs a lift & shift type of migration.

      For JSM (Jira Service Management) specifically, a database table called AO_4E8AE6_NOTIF_BATCH_QUEUE may cause errors during the Processing plugin data phase of a MAO import if one of its columns (RETRY_COUNT) has NULL values in it.

      This table holds entries related to email notifications sent to JSM customers.
      The column RETRY_COUNT may or not exist on the table, depending on the JSM version.
      Examples:

      • JSM 4.22.6 does not have this column
      • JSM 4.20.0 has the column

       

      This is reproducible on Data Center:

      Steps to Reproduce

      1. Have a JSM project that has sent notifications to JSM customers at one point and has the RETRY_COUNT column (with NULL values) on the AO_4E8AE6_NOTIF_BATCH_QUEUE table
      2. Migrate Jira Server data via the MAO feature in JCMA

      Expected Results

      MAO migrates the Jira data successfully.

      Actual Results

      The migration fails at the Processing plugin data task.
      On logs associated with the Cloud site, we see the stack trace below (a snippet):

      com.atlassian.rdbms.dbimportexport.runner.api.ImportExportException: Failed to import sequence data for AO_4E8AE6_NOTIF_BATCH_QUEUE belonging to (namespace: com.atlassian.servicedesk.servicedesk-notifications-plugin)
      	at com.atlassian.rdbms.dbimportexport.runner.impl.ImportRunnerImpl.importTableFromTableImportInput(ImportRunnerImpl.java:240)
      (...)
      
      Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "RETRY_COUNT" of relation "AO_4E8AE6_NOTIF_BATCH_QUEUE" violates not-null constraint
      

      Workaround

      Approach #1 (recommended)

      Use JCMA's Choose what to migrate option.

      Approach #2 (database change)

      Update any NULL entries on the column RETRY_COUNT on your JSM Server database table AO_4E8AE6_NOTIF_BATCH_QUEUE to 0:

      UPDATE AO_4E8AE6_NOTIF_BATCH_QUEUE SET RETRY_COUNT = 0 WHERE RETRY_COUNT = NULL;
      

      If PostgreSQL:

      UPDATE "AO_4E8AE6_NOTIF_BATCH_QUEUE" SET "RETRY_COUNT" = 0 WHERE "RETRY_COUNT" = NULL;
      

              Assignee:
              Keith Pinto (Inactive)
              Reporter:
              Osimar M. (Osi) | Atlassian Support (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: