User observed NullPointerException while editing the transition name

お困りですか?

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

コミュニティに質問

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約:

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

原因:

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

ソリューション

  • 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:


最終更新日: 2021 年 10 月 20 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.