Automation rule is triggered twice and fails with the error "Error marking step #XXXXX finished"

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

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

*Fisheye および Crucible は除く

要約

An automation rule that is using the Transition Issue action is triggered twice and the error below is observed in the audit logs on the duplicate execution of this rule:

Error marking step #XXXXX finished: root cause: Tried to update an entity that does not exist


環境

  • 8.0.0 以降の任意のバージョンの Jira Server/Data Center
  • Automation For Jira (A4J) Server/Data Center on any version from 7.4.0

診断

  • The automation rule is configured with the Transition Issue action
  • The trigger of the automation rule is Issue Transitioned, and it is configured with the option Execute this rule immediately ticked
  • The transition that is executed by this automation rule is firing 2 events in its post-functions, which can be seen in the workflow configuration.
    • The screenshot below shows an example of transition that is firing 2 events, the Generic Event, and the Issue Closed event:

原因

Automation rules are triggered on events that are fired from a specific Jira issue.

When using the workflow illustrated in the screenshot above, the following happens:

  • 2 events are fired by the post-functions (the Generic Event and the Issue Closed Event)
  • The automation rule is triggered twice (once per event, even though the issue that triggered the automation rule was transitioned only once)
  • The 2nd time the automation rule is triggered, when the Transition Issue Action is executed by it, the error below is thrown in the audit logs because the rule is trying to transition the same issue a second time to "Done" (while it has already been done)
    Error marking step #XXXXX finished: root cause: Tried to update an entity that does not exist

(info)  A few notes:

  • The error is only replicable if the trigger of the rule is configured with the option Execute this rule immediately ticked
  • Normally, it should not be possible to configure a transition to fire 2 events in Jira. However, under some conditions, a transition can be configured to fire a 2nd event, due to the bug below:
    • JSWSERVER-20014 - JIRA Agile Simplified Workflow allows you to add duplicates for some essential post functions Gathering Impact

ソリューション

Ensure that the transition only fires 1 event by removing one of the 2 post-functions that fires an event.

最終更新日: 2025 年 1 月 20 日

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

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