NullPointerException while editing the name of a transition

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

Summary

While editing the name of a transition, the error "common.forms.ajax.servererror" is thrown by the Jira UI:

(Auto-migrated image: description temporarily unavailable)

Environment

All versions

Diagnosis

Following exception is found in the atlassian-jira.log:

1 2 3 4 5 6 7 8 Uncaught exception thrown by REST service: null java.lang.NullPointerException at com.atlassian.jira.workflow.edit.Workflow.isDuplicateStepTransitionName(Workflow.java:793) at com.atlassian.jira.workflow.edit.Workflow.isDuplicateTransitionName(Workflow.java:743) at com.atlassian.jira.workflow.edit.Workflow.isDuplicateTransitionName(Workflow.java:506) at com.atlassian.jira.workflow.edit.WorkflowTransitionsImpl.verifyTransitionCanBeUpdated(WorkflowTransitionsImpl.java:325) at com.atlassian.jira.workflow.edit.WorkflowTransitionsImpl.updateTransition(WorkflowTransitionsImpl.java:95) ... 3 filtered

Or in alternative:

1 2 3 4 5 1999-00-00 00:00:00,000+0000 http-nio-0080-exec-0 url: /jira/rest/workflowDesigner/latest/workflows/transitions; user: USER ERROR USER SESSIONID IP /rest/workflowDesigner/latest/workflows/transitions [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Cannot invoke "com.opensymphony.workflow.loader.StepDescriptor.getActions()" because "sourceStep" is null java.lang.NullPointerException: Cannot invoke "com.opensymphony.workflow.loader.StepDescriptor.getActions()" because "sourceStep" is null at com.atlassian.jira.workflow.edit.Workflow.isDuplicateStepTransitionName(Workflow.java:794) at com.atlassian.jira.workflow.edit.Workflow.isDuplicateTransitionName(Workflow.java:744) at com.atlassian.jira.workflow.edit.Workflow.isDuplicateTransitionName(Workflow.java:507)

Cause

A transition step is not found in the Workflow and fails with NullPointerException.

Solution

Please Note

We strongly recommend testing the solution in a Staging environment and taking a backup of your database before updating the DB data.

ℹ️ For Production schedule a maintenance window to proceed

Solution 1

  1. Export the workflow as xml.

  2. Open it up in a text editor.

  3. Check for tag <initial-actions> in the XML.

  4. Notice what step ID is mentioned in the tag unconditional-result, it should be different than 1 :

    1 <unconditional-result old-status="null" status="open" step="10">
  5. When status is open(which is the Create issue step), API checks for step ID 1 as next step.

  6. Take the back up of XML. Modify this step ID to 1 and also track corresponding <step> tag to modify its ID as well to step id="1".

  7. Take a backup of the existing workflow and replace it with the modified one.

    Example: How to locate it in workflow:

(Auto-migrated image: description temporarily unavailable)
(Auto-migrated image: description temporarily unavailable)

Solution 2

Alternatively, and in case the workflow cannot be deleted from the UI, you can follow these steps:

  1. Follow steps 1 to 6 in Solution 1

  2. Stop Jira

  3. Update the XML entity in the DB as follows:

    1 UPDATE jiraworkflows SET descriptor = '<paste here the full edited XML>' where id = '<database workflow id>';
  4. Start Jira

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.