Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-9996

Export error prevents user from taking site backup of Jira Service Management Cloud

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • SLA
    • None

      Issue Summary

      User is unable to take site export. In the UI the receive Export error. Database shows the following task:

      Cloud Export task	Running export (blocking) migration task: Fix fileattachment size on export to server

      Steps to Reproduce

      Unknown at this time. Issue appears similar to JSDCLOUD-8638
      Based on the tables impacted, SLA may be the related component that resulted in the error.

      Expected Results

      The user should be able to take export especially when a backup is required for site import functionality

      Actual Results

      The user is unable to take a site backup. The following error appears in the logs:

      Export failed (preparation)","stack":"com.atlassian.jira.bc.export.ExportException: Export failed (preparation)
      \tat com.atlassian.jira.bc.export.CloudExportTaskRunner.export(CloudExportTaskRunner.java:282)
      \tat com.atlassian.jira.bc.export.CloudExportTaskRunner.lambda$runTaskAndStartZip$2(CloudExportTaskRunner.java:189)
      \tat com.atlassian.connpool.impl.AbstractConnectionPoolProvider.withPrivatePool(AbstractConnectionPoolProvider.java:185)
      \tat com.atlassian.jira.connpool.JiraViburConnectionPoolProvider.withPrivatePool(JiraViburConnectionPoolProvider.java:164)
      \tat com.atlassian.connpool.api.ConnectionPoolProvider.withPrivatePool(ConnectionPoolProvider.java:55)
      \tat com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$null$0(AbstractBackupTaskRunner.java:64)
      \tat java.util.Optional.map(Optional.java:215)
      \tat com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$runWithSeparateContextAsync$1(AbstractBackupTaskRunner.java:63)
      \tat java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
      \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      \tat java.lang.Thread.run(Thread.java:748)
      Caused by: com.atlassian.jira.bc.export.ExportException: Pre export changes failed
      \tat com.atlassian.jira.bc.export.PreExportTasks.prepareForExport(PreExportTasks.java:63)
      \tat com.atlassian.jira.bc.export.CloudExportTaskRunner.export(CloudExportTaskRunner.java:246)
      \t... 11 more
      Caused by: java.lang.RuntimeException: Failed to prepare JSD Rolex data for export
      \tat com.atlassian.jira.jsd.rolex.JsdRolexExportCleanser.prepareForExport(JsdRolexExportCleanser.java:43)
      \tat com.atlassian.jira.util.ThrowableFunctions.lambda$uncheckConsumer$0(ThrowableFunctions.java:80)
      \tat com.google.common.collect.ImmutableList.forEach(ImmutableList.java:406)
      \tat com.atlassian.jira.bc.export.PreExportTasks.prepareForExport(PreExportTasks.java:61)
      

      And:

      Suppressed: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"AO_54307E_METRICCONDITION_pkey\"
        Detail: Key (\"ID\")=(6) already exists.
      ...
      Caused by: java.sql.BatchUpdateException: Batch entry 6 insert into \"public\".\"AO_54307E_METRICCONDITION\" (\"ID\", \"PLUGIN_KEY\", \"FACTORY_KEY\", \"CONDITION_ID\", \"TYPE_NAME\", \"TIME_METRIC_ID\")
      values (6, 'com.atlassian.servicedesk', 'issue-created-sla-condition-factory', 'issue-created-hit-condition', 'Start', 3) was aborted: ERROR: duplicate key value violates unique constraint \"AO_54307E_METRICCONDITION_pkey\"
        Detail: Key (\"ID\")=(6) already exists.  Call getNextException to see other errors in the batch.
      
      Caught BatchUpdateException for insert into \"public\".\"AO_7A2604_WORKINGTIME\" (\"ID\", \"CALENDAR_ID\", \"DAY\", \"START_TIME\", \"END_TIME\", \"DISABLED\")
      values (?, ?, ?, ?, ?, ?)","stack":"com.querydsl.core.QueryException: Caught BatchUpdateException for insert into \"public\".\"AO_7A2604_WORKINGTIME\" (\"ID\", \"CALENDAR_ID\", \"DAY\", \"START_TIME\", \"END_TIME\", \"DISABLED\")
      values (?, ?, ?, ?, ?, ?)
      ...
      Suppressed: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"AO_7A2604_WORKINGTIME_pkey\"
        Detail: Key (\"ID\")=(2) already exists.
      ...
      Caused by: [CIRCULAR REFERENCE: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"AO_7A2604_WORKINGTIME_pkey\"
        Detail: Key (\"ID\")=(2) already exists.]
      

      Workaround

      Make sure SLAs in your JSM projects are associated with the correct calendar entities.

          Form Name

            [JSDCLOUD-9996] Export error prevents user from taking site backup of Jira Service Management Cloud

            We have fixed this issue.

            Himanshu Malhotra added a comment - We have fixed this issue.

              8a3861d8a88c Manas Shukla
              asalinasii@atlassian.com Alfonso S.
              Affected customers:
              19 This affects my team
              Watchers:
              19 Start watching this issue

                Created:
                Updated:
                Resolved: