Screens are not showing Workflow Association and can not delete unused screens in Jira
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
Summary
The Screen administration page doesn't show the Workflows associated with each screen and it's not possible to delete any screen.
Environment
Jira 7 or higher
Diagnosis
When loading the Screen admin page with the list of all screens in Jira, confirm if atlassian-jira.log
exhibits a message like the one below:
2021-04-19 15:53:53,289-0300 http-nio-58131-exec-25 ERROR admin 953x2146x1 tfyrst 0:0:0:0:0:0:0:1 /secure/admin/ViewFieldScreens.jspa [webwork.util.ValueStack] METHOD: "workflowTransitionViews", exception:
java.lang.IllegalArgumentException: Cannot find Screen with id '3'.
at com.atlassian.jira.workflow.WorkflowActionsBean.getFieldScreenForView(WorkflowActionsBean.java:57)
The keywords are: Cannot find Screen with id
Cause
There's a workflow using a screen that no longer exists, causing the rendering of the screen to fail and lose some functionality.
As screens in use are not eligible to be deleted, this could only have happened if importing a corrupted workflow XML or hijacking the screen deletion URL to delete a screen in use.
Solution
If the missing screen id is higher than 3
Refer to this related KB article to find and edit the related workflows: IllegalArgumentException when searching for issues with specific statuses, or when loading the Workflows page in Jira server.
If the missing screen id is 1, 2 or 3
These very low screen ids are default Jira screens and are hardcoded into some uneditable default workflows. To resolve the issue we must recreate the screen through database updates:
- Create a new screen, maybe called "Resolve Issue Screen (system)"
- Add the Resolution field to it
Take note of the id that's in the URL (eg. 10302):
<jira-url>/secure/admin/ConfigureFieldScreen.jspa?id=10302
Execute these two updates on the database, replacing 10302 accordingly and the
3
for the screen id that's missing:update fieldscreentab set fieldscreen = 3 where fieldscreen = 10302; update fieldscreen set id = 3 where id = 10302;
Restart Jira