No delete option on Screens


アトラシアン コミュニティをご利用ください。



Browsing to Administration > Issues > Screens there is no option to delete a screen, even if it was just created. In the logs the following error appear:

2013-12-19 13:24:50,513 http-bio-8080-exec-3 ERROR user 404x1557x1 4s34af /secure/admin/ViewFieldScreens.jspa [webwork.util.ValueStack] METHOD: "deletable", exception: 
java.lang.IllegalArgumentException: Unknown workflow view 'ScreenName', or cannot find attribute '' for workflow action '1'.
	at com.atlassian.jira.workflow.WorkflowActionsBean.getFieldScreenForView(
	at com.atlassian.jira.workflow.AbstractJiraWorkflow.loadFieldScreenActions(
	at com.atlassian.jira.workflow.AbstractJiraWorkflow.getActionsForScreen(
	at com.atlassian.jira.web.action.admin.issuefields.screens.ViewFieldScreens.hasWorkflowsIncludingDrafts(
	at com.atlassian.jira.web.action.admin.issuefields.screens.ViewFieldScreens.isDeletable(
	at sun.reflect.GeneratedMethodAccessor378.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(
	at webwork.util.InjectionUtils.invoke(
	at webwork.util.ValueStack.findValue(
	at webwork.util.SimpleTest.test(
	at webwork.util.ValueStack.test(
	at webwork.view.taglib.IfTag.doStartTag(
	at org.apache.jasper.runtime.HttpJspBase.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.jasper.servlet.JspServletWrapper.service(
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(


It happens because the attribute is missing from the workflow - perhaps this screen was deleted.

ソリューション 1

  1. Go through Using the Database Integrity Checker first to see if this helps. If not:

  2. Verify if those screens exist the database. It's likely they were somehow deleted:

    SELECT * 
    FROM   fieldscreen 
    ORDER  BY 2;

    (info) If these have been deleted, they can be restored by restoring the entire instance using the XML backup. They cannot be restored by themselves through the application.

  3. You need to find in which Workflow this error is from. This can be done by identifying the workflow with those screen names in it. Replace 'Default Screen' with the screen name from the exception(s).

    SELECT workflowname 
    FROM   jiraworkflows 
    WHERE  descriptor LIKE '%Default Screen%';
  4. Export that workflow to XML. This is done by viewing the workflow and clicking Export > XML.
  5. Search the XML for the screen name, e.g.: 'Default Screen':

        <action id="500" name="Go to Resolved" view="Default Screen">
          <meta name="jira.description"></meta>
          <meta name="">1</meta>
  6. Change the to a valid value from step 1, for example:

        <action id="500" name="Go to Resolved" view="Default Screen">
          <meta name="jira.description"></meta>
          <meta name="">10000</meta>
  7. Backup the database (using XML or native DB tools).

  8. Import that edited workflow XML.


ソリューション 2

Alternatively, if you cannot import the workflow or if there are too many workflows to be modified, you can use the following operation that will change the workflows directly in the database. This was only tested in JIRA 7.

This operation relies on database manipulations. 'Resolution 1' is safer and should be used if possible. If you decide to use this resolution, please, take a database backup before doing any changes.

Also, this resolution requires a 'Linux' system, as the script used won't work in Windows (if you're running JIRA in a Windows system, just copy the 'descriptors' file generated in step 1 to a Linux system and proceed from there.

This will replace all non-existing references to screens to a single screen you'll create.

  1. Copy the result of the following 'select' to a file named 'descriptors.xml'

    select descriptor from jiraworkflows;
    1. There are different commands in different databases. The following command works for 'postgres':

      copy ( select descriptor from jiraworkflows ) to '/path/descriptors.xml';
  2. Make sure you have the 'descriptors' file in a Linux system 
  3. Make sure the file has new lines (not the '\n' characters) in XML file. Depending on how the data is copied, each descriptor may be in a single line. If so, this may resolve it:

    cat descriptors.xml  | sed -r -e 's/\\n/\n/g' > descriptors_fixed.xml
    mv descriptors_fixed.xml descriptors.xml
  4. Create a new screen in Screens page in JIRA without any fields and take note of its ID in the URL
  5. Copy the following script to a script file (say in the same directory as 'descriptors.xml', replacing <NEW_ID>, by the screen's ID

    # Change here!
    SEARCH_STRING='<meta name="">'
    cat $FILE | grep "$SEARCH_STRING" | sort | uniq | while read line;
    	ID=`echo $line | cut -d '>' -f 2 | cut -d '<' -f 1`
    	echo -e "\033[0;31m If the following select doesn't return anything\033[0m, run the update below it. \033[0;31mDon't run in otherwise\033[0m"
    	echo "select * from fieldscreen where id = $ID;"
    	echo "update jiraworkflows set descriptor = replace(descriptor,'<meta name=\"\">${ID}</meta>', '<meta name=\"\">${NEW_SCREEN_ID}</meta>');"
  6. Give it executable permissions:

    chmod a+x
  7. Run it

  8. Stop JIRA and backup the database
  9. Follow the instructions, run the updated only if the select above it doesn't return anything. This will change only the references to non-existing screens.
  10. Jira を起動します。


Last modified on Mar 18, 2016


Powered by Confluence and Scroll Viewport.