Unable to utilize imported or restored workflow in Jira server

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

Problem

  1. After a XML restore or workflow import, a linked status has as a NULL value.

  2. Users are not able to use the workflow once it's active. If they try, a NullPointerException is thrown.

  3. Users get an IllegalArgumentException when attempting to to publish the draft workflow

  4. Loading an Agile Board for the affected project might result into errors.

Cause

The workflow XML is inconsistent. Although a linked status ID is referenced in the workflow XML, the status does not exist in the database.

ℹ️ If the linked status entry isn't part of the workflow XML, it is assumed a NULL value.

Diagnosis

Looking into the affected workflow, we should be able to see broken Statuses :

(Auto-migrated image: description temporarily unavailable)

One of the following appears in the Jira logs file atlassian-jira.log: (located in <Jira_Home>/log):

1 2 3 4 5 2011-02-08 14:50:26,111 http-8080-7 ERROR user 890x362x1 1qdw44h 0:0:0:0:0:0:0:1 /secure/project/SelectProjectWorkflowSchemeStep2!default.jspa [webwork.util.ValueStack] METHOD: "numAffectedIssues", exception: java.lang.NullPointerException     at com.atlassian.jira.web.action.admin.workflow.scheme.SelectProjectWorkflowSchemeStep2.getNumAffectedIssues(SelectProjectWorkflowSchemeStep2.java:182)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
1 2 3 4 java.lang.NullPointerException at com.atlassian.jira.web.action.admin.workflow.scheme.SelectProjectWorkflowSchemeStep2.getSelectListName(SelectProjectWorkflowSchemeStep2.java:255) at com.atlassian.jira.web.action.admin.workflow.scheme.SelectProjectWorkflowSchemeStep2.addMigrationMappings(SelectProjectWorkflowSchemeStep2.java:181) at com.atlassian.jira.web.action.admin.workflow.scheme.SelectProjectWorkflowSchemeStep2.doExecute(SelectProjectWorkflowSchemeStep2.java:120)
1 2014-09-18 17:24:12,627 ajp-bio-127.0.0.1-8080-exec-48674 INFO admin 1044x20709271x4 1bcqfam 10.10.10.2 /issues/ [jira.jql.context.StatusClauseContextFactory] Workflow: 'test workflow' associated with project: '10000' and issue type: 'default' contains a null status, you might want to fix that.
1 2 3 java.lang.IllegalArgumentException at com.atlassian.jira.workflow.AbstractJiraWorkflow.getLinkedStep(AbstractJiraWorkflow.java:199) at com.atlassian.jira.bc.workflow.DefaultWorkflowService.validateOverwriteWorkflow(DefaultWorkflowService.java:437)
1 2 3 4 Exception: Uncaught TypeError: Cannot read property 'errors' of undefined Resource: http://10.117.8.44:8080/GHS-116450/s/45a2104f4497b88b2f3af9a18580d5a6-CDN/-ln9hzm/79001/03fafac7ef96d0fe1462ba2c1c1b64f3/a232651f5da4f9678764ecf636a7384d/_/download/contextbatch/js/greenhopper-rapid-non-gadget,atl.general,gh-rapid,jira.project.sidebar,jira.general,com.atlassian.jira.projects.sidebar.init,jira.global,-_super/batch.js?agile_global_admin_condition=true&baseurl-check-resources=true&healthcheck-resources=true&is-server-instance=true&is-system-admin=true&jag=true&jaguser=true&locale=en-US&nps-acknowledged=true&nps-not-opted-out=true&whisper-enabled=true Line: 307809 Column: 64

Resolution

  1. Find the ID of NULL linked status entry:

    1. Go to Workflows in Jira Administration. Export the workflow as XML.

    2. Using an external XML viewer or text editor, open the file and search for the step related to the linked status. You'll find something like:

      1 2 3 4 5 6 <step id="3" name="STEP"> <meta name="jira.status.id">10007</meta> <actions> <action id="41" name="To Integration"> <meta name="jira.description"></meta> <results>

      ℹ️ The data between <meta name="jira.status.id"> and </meta> refers to the ID of broken linked status.

  2. Create a temporary status that will be used to replace the NULL value in the workflow. ⚠️ Restart required.

    Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

    1. Go to Administration >> Issue Settings >> Statuses. Select Add New Status. Add a new status called "TEMP".

    2. Run the following query on your JIRA database:

      1 SELECT * FROM issuestatus;
    3. In results, search for the ID of new status TEMP. If the TEMP id matches the ID previously found on workflow XML, your problem is solved. The null value has been replaced.

      In case this value doesn't match, you'll need to set the ID manually. On your database, run:

      1 UPDATE issuestatus set id='<ID>' where pname='TEMP';

      Run the previous select again in order to check if this last command ran okay.

  3. Restart your Jira Instance. For Jira Data Center, a rolling restart was found sufficient.

  4. Finally, go to Administration >> System >> Integrity Checker and run it.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.