-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
13
-
Minor
Issue Summary
This export error could happen in the following scenarios :
- 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.
- Scenario #2: Approval has reference to "Issue Status" that was deleted from Workflow and it doesn't exist in the Database
Steps to Reproduce
- Create new Status “New Status”
- Create new Request type with Issue Type - Service Request with Approvals
- Go to Service Request with Approvals Workflow
- Add new status and choose “New Status”
- Add new transition from from “Waiting For Approval” → “New Status”
- Add two new transitions from “New Status” for approved and declined scenarios
- Configure “New Status” → Add approval → Configure transitions
- Raise a request and make two approves
- Make sure that Approval is saved in DB with “New Status” reference
- Delete “New Status” from workflow
- 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
- Workflow descriptor XML
- 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.