JIRA Crashes and Throws 'Unknown workflow name' Error
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
The message below is displayed in the log:
2010-12-09 11:13:25,957 http-8080-21 ERROR xxxxx 673x21425x1 xxxxxxx 127.0.0.1 /sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml [atlassian.jira.workflow.OSWorkflowManager] Could not get workflow called: Sample One Workflow: com.opensymphony.workflow.FactoryException: Unknown workflow name com.opensymphony.workflow.FactoryException: Unknown workflow name
- Running the integrity checker does not help
- The reported workflow does exist in JIRA (in this case called 'Sample One Workflow'). To confirm, go to Administration > Global Settings > Workflows
- The workflow also exists in the database table jiraworkflows but it is using different letter case (either lower or upper case)
All JIRA workflows went missing in JIRA User Interface but workflow scheme still showing the data.
If you get the fifth symptom, please jump to the resolution no.5.
Cause
This is due to a database integrity issue.
Resolution
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
- Shutdown JIRA;
Get the workflow ID by searching for the workflow:
SELECT * FROM jiraworkflows;
Update the workflowname for the related workflow to have the correct letter case:
update jiraworkflows set workflowname='<Workflow_Name>' where ID=xxxxxx;
If the above does not work, it could be the case the defined workflow to workflow scheme has conflicting case sensitive names. In this case, verify with:
select * from workflowschemeentity where workflow like '<Workflow_Name>';
You should find both your workflows above (uppercase, lowercase, etc). Then you should try:
update workflowschemeentity set workflow = '<Final_Workflow_Name>' where workflow in (select workflow from workflowschemeentity where workflow like '<Workflow_Name>');
Be very cautious with the above. Try on a test system first and be sure to double-check your instance afterwards.
This resolution only apply for Symptoms 5:
--Search for the JIRA workflow name that is not match with the workflow scheme entity select * from workflowschemeentity where workflow not in (select workflowname from jiraworkflows); --Get the workflow ID by searching for the workflow SELECT * FROM jiraworkflows; --Update the JIRA workflow to the correct name update jiraworkflows set workflowname = '<Workflow_Name>' where id = xxxxx; --Search for the JIRA workflow name that is not match with the workflow scheme entity for the second time select * from workflowschemeentity where workflow not in (select workflowname from jiraworkflows); --Update the JIRA workflow scheme entity to the final workflow name that you had updated update workflowschemeentity set workflow = '<Final_Workflow_Name>' where workflow not in (select workflowname from jiraworkflows);
- Restart JIRA
After that:
- Run the integrity checker under Administration. That might show you that some of your issues have been left incapacitated because of the above change. For example, issues might be left in status Open while <Final_Workflow_Name> has not such status.
- In that case, you can add a status Open in your workflow so that you can access those issues.
- Open those issues and Clone them. The new issues are fine, following the correct workflow consistently.
- Delete the old issues.