Email Automation Issue
Asked by Michael Bray:

I have set up an automation that sets the priority of an incident based on the impact and urgency, following that I want it to send an email to the support mailbox with the summary, description and priority.

The mail sends as expected but is displaying the default priority and not the actual priority, so no matter what the actual priority is the mail states that the priority is 3, which is the default.

Anybody able to help so that it displays the correct priority in the email?

Cheers


Answers:
author: Jovin
body: Hey [@Michael Bray](/t5/user/viewprofilepage/user-id/5526161)

This comes down to when the issue data is retrieved by the automation. If you're modifying values and then sending the email, you're still looking at the original data set retrieved - confusing, right?!

Before you send the email insert an action called **Re-fetch issue data**, that will solve your problem :)

comments: author: Nicolas Grossi
body: [@Jovin](/t5/user/viewprofilepage/user-id/5104734) why is needed to call this function in 2 totally different actions ? I think there is an issue there.

Nicolas


author: Michael Bray
body: Awesome thank you, been tearing my hair out on this one :-)


author: Jovin
body: Hey [@Nicolas Grossi](/t5/user/viewprofilepage/user-id/676185) - I see the screenshot of the automation below in reply to you; nothing is being modified in that current automation, but it looks like it's possibly firing BEFORE his prioritisation automation.

The separate action is required as when the automation starts it loads the data into "local memory" for quick referencing in the automation, the modification actions modify the database "remote memory". Before you then do anything else with it, you should re-fetch to get that latest version of data. You can see it here in the knowledge under "Re-fetch issue data" <https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/>

[@Michael Bray](/t5/user/viewprofilepage/user-id/5526161) - I'd suggest you merge your prioritisation automation into the email notification, doing the prioritisation before the email and include the Re-fetch issue data.


author: Nicolas Grossi
body: [@Jovin](/t5/user/viewprofilepage/user-id/5104734) Your explanation is perfect, but for me, there is an issue there sorry :(


author: Jovin
body: [@Nicolas Grossi](/t5/user/viewprofilepage/user-id/676185) - Yeah it's an unusual configuration of the product, but I'm sure it exists for some legacy reason ?


author: Nicolas Grossi
body: snif snif :( :( I would like to hear the explanation of that "legacy reason" from the creator of that feature :)


author: Nikola Perisic
body: Welcome to the community [@Michael Bray](/t5/user/viewprofilepage/user-id/5526161)

You can change the priority scheme for your project and choose the default priority for it.

comments: author: Michael Bray
body: yeh its not the default priority I want to change, its the priority reported in the email notification


author: Nicolas Grossi
body: [@Michael Bray](/t5/user/viewprofilepage/user-id/5526161) Can you add details of your automation configuration and mail setup ?

Nicolas

comments: author: Michael Bray
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/331129iADBB7E298256F37A/image-size/large?v=v2&px=999 "image.png")


author: Nicolas Grossi
body: [@Michael Bray](/t5/user/viewprofilepage/user-id/5526161) And you are saying that issue priority is set on creation and it is different when the mail is send ?

Nicolas


Tags: cloud

jira-service-management

jira-service-management-cloud