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

Muhammad Akram Sharifi December 28, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2021

Hi Akram,

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

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

Muhammad Akram Sharifi December 29, 2021

Hi @John Funk 

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

Like # people like this
0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2021

Hi @Muhammad Akram Sharifi

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

Regards

Muhammad Akram Sharifi December 28, 2021

Hi @Fabian Lim 

its a Single select list field. 

thanks for reaching out. 

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 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.

Muhammad Akram Sharifi December 28, 2021

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.

Muhammad Akram Sharifi December 29, 2021

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. 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events