Issue event in jira trigger duplicate notifications for the "Field value changed" trigger in automation rules

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Duplicate notification emails triggered by the automation rules.

Environment

Automation for Jira

Diagnosis

The automation rule needs to be configured as shown below in the screenshot:

You can find more details about the automation rule below:

  • WHEN
    • Field value changed: Value changes for:  Issue Type

  • If: matches (you need to add a new if/else block, with an "Advanced compare condition")
    • First value: {{issue.Assignee group}} 

    • Condition: Starts with

    • Second value: _
  • THEN (to place inside the branch rule)
    • Send email: Assignee group

  • ELSE block:
  • THEN (to place inside the branch rule)
    • Send email: to a different group

(info) NOTE: Here Assignee group is a custom field of type group picker however the rule need not have to be in the same way however this KB applies to you if you are using an automation rule and the trigger is "Field value changed".

(info) HINT: to learn more about the automation rules in the audit log we can add the "Log action" action to the automation rule Example: Changed values:{{fieldChange.fromString}} to {{fieldChange.toString}} for the affected field so that you'll see more info in the logs.

Cause

The duplicate emails were triggered by are expected behaviour of the automation rules and their configurations. For example, in the automation rule's trigger, we have 3 events like "Edit issue", "Transition issue" & "Create issue" for the trigger "field value changed" as highlighted below:

As some fields will be filled during issue creation, for that event the automation rule triggers one email, and if that gets changed while editing an issue or transitioning an issue then that would trigger another email.

Solution

To avoid multiple emails getting triggered for the same field(Example: Issue Type) select only Edit issue or Create issue operations in the triggers so that duplicate emails can be avoided.

(warning) These options provided here are just examples your rules might vary based on your requirements, so please verify and test this first on a TEST/Staging instance before trying it on PRODUCTION.



Last modified on Dec 4, 2023

Was this helpful?

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