Error 'Could not find workflow status for issue' is thrown when accessing issue
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Issue is exist in the database, but stack trace is thrown
Project's Workflow Scheme cannot be switch
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
ERROR [500ErrorPage.jsp] Exception caught in 500 page Could not find workflow status for issue DEMO-837.
java.lang.RuntimeException: Could not find workflow status for issue DEMO-837.
at com.atlassian.jira.permission.PermissionContextImpl.getStatusGV(PermissionContextImpl.java:113)
at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:90)
at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:30)
at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
In Jira 8.13+:
1
2
3
4
5
6
7
Caused by: java.lang.RuntimeException: Could not find workflow status for issue DME-10.
at com.atlassian.jira.permission.PermissionContextImpl.getStatusSetOrFromIssue(PermissionContextImpl.java:94)
at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:76)
at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:33)
at com.atlassian.jira.security.WorkflowBasedPermissionManager.workflowPermissionCheck(WorkflowBasedPermissionManager.java:196)
at com.atlassian.jira.security.WorkflowBasedPermissionManager.workflowPermissionCheck(WorkflowBasedPermissionManager.java:172)
at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:83)
Diagnosis
Run the SQL query below against the JIRA database to check if there any issue with non-existing status.
For versions JIRA 6+
1
2
3
4
select (p.pkey || '-' || i.issuenum) as issuekey, i.issuestatus
from jiraissue i, project p
where i.project = p.id
and i.issuestatus not in (select id from issuestatus);
For versions before JIRA 6
1
select pkey,issuestatus from jiraissue where issuestatus not in (select id from issuestatus);
Cause
Database inconsistency that might be caused by recent workflow switch that is incomplete and
incomplete status removal
Resolution
Create new status(es) to replace the deleted status(es)
Ensure that the inaccessible issues are now visible
Switch the Project's Workflow Scheme
Was this helpful?