Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,095
Community Members
 
Community Events
168
Community Groups

How to get the previous value of the field in jira email automations

Dear All, 

I am working on an automation to send update emails when the value of the "Customer temp" field is changed I have used some smart values for the automation as under

Customer Temperature has Changed from {{changelog.Customer Temperature.from}} to {{issue.fields.Customer Temperature}} !!!

I get the result as "Customer Temperature has Changed from 12821 to Happy !!!"

where i dont understand why I am getting "12821" value from

expected result: "Customer Temperature has Changed from Unhappy to Happy !!!

 

I appreciate your helps in advance. 

2 answers

1 accepted

2 votes
Answer accepted
John Funk Community Leader Dec 28, 2021

Hi Akram,

Since it is only firing on the value of the field changing, try this:

[ {{fieldChange.fromString}} ] to [ {{fieldChange.toString}} ]

Hi @John Funk 

Thanks for your reply, I found the {{changelog.nameofthefield.fromstring}} also useful.

Like John Funk likes this
0 votes
Fabian Lim Community Leader Dec 28, 2021

Hi @Muhammad Akram Sharifi

What type of customfield is "Customer temp'? Is it a single select field?

Regards

Hi @Fabian Lim 

its a Single select list field. 

thanks for reaching out. 

Fabian Lim Community Leader Dec 28, 2021

You probably have to call .Name or .Value to get the actual value.  Right now, it's picking the ID of the option.

I hope this helps.

I have used both following cases but didn't worked. 

Customer Temperature has Changed from {{changelog.Customer Temperature.from.Name}} to {{issue.fields.Customer Temperature}} !!!

And 

Customer Temperature has Changed from {{changelog.Customer Temperature.Name}} to {{issue.fields.Customer Temperature}} !!!

let me know if i making any mistake.

Dear all

I have found out that using the smart value {{changelog.Customer Temperature.fromString}} is giving me the previous value of the field in automations. 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events