Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-896

Approval fails to export with error - Verify if Issue status with id xxxx is valid.

    XMLWordPrintable

Details

    • 13
    • Minor

    Description

      Issue Summary

      This export error could happen in the following scenarios :

      1. Scenario #1: Approval has reference to "Issue Status" that was deleted from Workflow however it still exists in the DB and Approval is not stale.
      2. Scenario #2: Approval has reference to "Issue Status" that was deleted from Workflow and it doesn't exist in the Database

      Steps to Reproduce

      1. Create new Status “New Status”
      2. Create new Request type with Issue Type - Service Request with Approvals
      3. Go to Service Request with Approvals Workflow
      4. Add new status and choose “New Status”
      5. Add new transition from from “Waiting For Approval” → “New Status”
      6. Add two new transitions from “New Status” for approved and declined scenarios
      7. Configure “New Status” → Add approval → Configure transitions
      8. Raise a request and make two approves
      9. Make sure that Approval is saved in DB with “New Status” reference
      10. Delete “New Status” from workflow
      11. Try to export or migrate project

      Expected Results

      Scenario #1: Migrate Approvals successfully.

      Scenario #2: We should migrate only those approvals that have references to existing / value Issue statuses in DB (NOTE: This decision is still under discussion and isn't final)

       

      Actual Results

      The below exception is thrown in the JCMA error log file

      2021-XX-XX XX:XX:48.724 ERROR XXXXX project-export Approval with MRI - mri:mig:jira/classic:issueStatus:1234 has missing Issue status with id - 12345. Verify if Issue status with id 12345 is valid. 

      Workaround

      Scenario #1:

      If "Issue Status" exists in the database, then client should add this dark FF in server `com.atlassian.jira.migration.status-pruning-disable.feature.enabled` . So, issue statuses will be exported as global entities.

      Scenario #2:

      If "Issue Status" does not exist in database, but its references are present then we need to remove such references. The reference could exist in multiple places such as

      1. Workflow descriptor XML
      2. Approval table

      Appropriate SQL queries need to be executed to remove invalid Issue status references from the server database.

      NOTE: The next version of JCMA which is marked for release mid December will contain a fix such that the above mentioned workarounds aren't required. 

      Attachments

        Issue Links

          Activity

            People

              7689c13aa320 Denys Svietikov (Inactive)
              cb409c559c8f Keith Pinto (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: