User observed NullPointerException while editing the transition name

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center Only - This article only applies to Atlassian products on the data center platform.

Summary:

When user is editing the transition name, the error "common.forms.ajax.servererror" is thrown in the UI. Here is the screenshot for more information. 


Environment :

8.13

Diagnosis:

  • When checking the har file, check the PUT endpoint that tries to make the modification of transition name:

    rest/workflowDesigner/latest/workflows/transitions
    • You should see that it always picks up sourceStepId as 1 and system checks for step with that particular ID in system for that workflow:
  • When checking the Jira logs, you should see the java.lang.NullPointerException as mentioned below:

    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

Cause:

As the step with ID 1 is not found in the system, it fails with NullPointerException. 

Solution:

  • Export the workflow as xml.
  • Open it is up in text editor. 
  • Check for tag  <initial-actions> in the XML.

  • Notice what step ID is mentioned in 

    <unconditional-result old-status="null" status="open" step="10">
  • When status is open(which is create step), API checks for step ID 1 as next step. 
  • 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"
  • Delete the existing workflow and import the modified one.
  • Here is an example of edit workflow for reference: 


    Example: How to locate it in workflow:


Last modified on Oct 20, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.