While importing tickets from a legacy system to Jira, several thousands tickets got imported with incorrect status. Namely, what used to have status of "Verified in QA", should've been imported with status of "QA Complete". Instead, all these tickets got imported as "Closed" (with resolution "Resolved").
Rerunning the import is impossible -- I need to fix the situation. Although using the REST API would be one approach, it seems both slow and imperfect: each ticket would first need to be transitioned from "Closed" to "Reopened" and then -- into "QA Complete".
Can I fix the problem by direct manipulation of the database? I know the exact list of tickets affected -- I imported each status-transition and can now find them all in the changeitem-table. If I:
- update jiraissue-table:
changing the issuestatus-field to the id of "QA Complete" (as found in the issuestatus-table)
resetting both the RESOLUTION and the RESOLUTIONDATE to NULL:
update jiraissue, changegroup, changeitem
set issuestatus=(select id from issuestatus
where pname='QA Complete'),
RESOLUTION=NULL, RESOLUTIONDATE=NULL
where changegroup.issueid = jiraissue.id
and changeitem.groupid=changegroup.ID
and NEWSTRING='Verified in QA'
- update the changeitem-table changing NEWVALUE to "QA Complete" wherever NEWSTRING is "Verified in QA"
- Restart Jira
Will it all "just work" afterwards? I tried this in our test-instance of Jira and life seems good -- have I left some landmine for myself to blow up later, or is this a (relatively) safe thing to do?
Thank you!