Unable to Transition Issues Imported from Mantis
Symptoms
After importing issues from Mantis, workflow operations fail. Erros appear like:
2007-09-27 12:38:13,245 http-8080-Processor24 [webwork.dispatcher.ServletDispatcher] Could not execute action
java.lang.RuntimeException: Could not find workflow status for issue TST-18.
at com.atlassian.jira.permission.PermissionContextImpl.getStatusGV(PermissionContextImpl.java:106)
at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:83)
...
2007-09-27 12:38:13,247 http-8080-Processor24 ERROR [[Catalina].[localhost].[/].[action]] Servlet.service() for servlet action threw exception
java.lang.RuntimeException: Could not find workflow status for issue TST-18.
at com.atlassian.jira.permission.PermissionContextImpl.getStatusGV(PermissionContextImpl.java:106)
at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:83)
at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:26)
Cause
The Mantis importer doesn't perform any validation for the existence of the Mantis statuses in JIRA.
Resolution
Ensure that all Mantis statuses exist in JIRA before importing data. Alternatively, run an SQL query that will change status -1 in JIRA into an existing one. For example the SQL query to convert broken entries into the entries with status Open (1):
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
update jiraissue set issuestatus=1 where issuestatus=-1;
update OS_CURRENTSTEP set STEP_ID=1 where STEP_ID=-1;