Uploaded image for project: 'Automation for Cloud'
  1. Automation for Cloud
  2. AUTO-1011

The organization field is not being set properly via automation when the condition is achieved via email

    • 1
    • Minor
    • Jira Service Management

      Issue Summary

      When using automation to set an organization according to the request participant field, the Organization field is not being filled up when the ticket is created via email.

      Steps to Reproduce

      1. Create an automation rule similar to the example below:
      2. Create a ticket via email and CC: the participant who will trigger the rule to fill up the organization field according to the automation rule.

      Expected Results

      The organization field must be filled up properly after matching the conditions.

      Actual Results

      Automation won't update the Organization field in the ticket.
      When the ticket is created via the portal or the internal interface the automation works fine.

      Workaround

      Add a re-fetch after the trigger this must fix the delay:

      Or
      Add the request participant after the issue creation by leaving a comment on the ticket and adding the user in the CC: field via email.

        1. Screenshot 2023-11-16 at 15.06.56.png
          74 kB
          Charles Trilha
        2. Screenshot 2023-11-16 at 17.16.47.png
          95 kB
          Charles Trilha

            [AUTO-1011] The organization field is not being set properly via automation when the condition is achieved via email

            @Yuri Moura

            The issue is that either:

            A) the value isn't available when the automation event is fired, which it isn't. Which seems like the bug.

            Or

            B) as you say, there is some async behavior going on, and the value isn't set when the issue is created, thus the bug would be that the field changed automation event is not firing correctly when the value is eventually set by the asynchronous behavior.

             

            I had also tried triggering on field changed, but that event does not fire when the issue is newly created. And the value is also not available on the issue created event. I hope you can see what I'm describing where either the value should be there when the issue created event runs, or if the value is set later, that delayed setting ought to trigger the field changed event automation.

            Thanks,

            Dustin

            Dustin Graham added a comment - @Yuri Moura The issue is that either: A) the value isn't available when the automation event is fired, which it isn't. Which seems like the bug. Or B) as you say, there is some async behavior going on, and the value isn't set when the issue is created, thus the bug would be that the field changed automation event is not firing correctly when the value is eventually set by the asynchronous behavior.   I had also tried triggering on field changed, but that event does not fire when the issue is newly created. And the value is also not available on the issue created event. I hope you can see what I'm describing where either the value should be there when the issue created event runs, or if the value is set later, that delayed setting ought to trigger the field changed event automation. Thanks, Dustin

            The behavior reported with the Request Participants field not being recognized by Automation as populated at issue creation is due to the way Jira Service Management processes updates. Jira fires the 'issue created' event before JSM has time to add the participants. This isn't a bug, but how the system is designed to work asynchronously. The field will be updated shortly after creation, which is why you see it in the subsequent 'issue updated' event. Adding the Re-Fetch Issue Data action right after the trigger updates the Automation rule with the correct data

            Yuri Moura (Inactive) added a comment - The behavior reported with the Request Participants field not being recognized by Automation as populated at issue creation is due to the way Jira Service Management processes updates. Jira fires the 'issue created' event before JSM has time to add the participants. This isn't a bug, but how the system is designed to work asynchronously. The field will be updated shortly after creation, which is why you see it in the subsequent 'issue updated' event. Adding the  Re-Fetch Issue Data action right after the trigger updates the Automation rule with the correct data

            7d600f87fa6c please, check our support ticket. I left a new comment there.

            Charles Trilha (Inactive) added a comment - 7d600f87fa6c please, check our support ticket. I left a new comment there.

            The issue with the workaround is that the initial ticket has to be noticed that it came in and wasn't classified correctly. This could be missed, and then the CC may never happen, and the ticket will proceed without the correct organization classification.

            It would be just as easy to manually add the organization as it would be to reply to the created ticket notification and CC the purchasing in order to trigger the automation, so I don't think the workaround is a great option for some cases.

            Dustin Graham added a comment - The issue with the workaround is that the initial ticket has to be noticed that it came in and wasn't classified correctly. This could be missed, and then the CC may never happen, and the ticket will proceed without the correct organization classification. It would be just as easy to manually add the organization as it would be to reply to the created ticket notification and CC the purchasing in order to trigger the automation, so I don't think the workaround is a great option for some cases.

              Unassigned Unassigned
              ctrilha@atlassian.com Charles Trilha (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: