Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find/reference the previous value for an object's attribute?

Michael Gormley October 16, 2024

Hello, I'm trying to build a global automation to send a notification email when a certain attribute is updated for objects in a given object schema.

We have a CMDB schema that contains a list of Business Applications. Within those business apps we have a custom attribute, "SOX". We need the automation to trigger any time that attribute is changed.

I built a global automation that triggers when a CMDB object is updated, checks that the objectType is Business Applications, and sends an email with some info including the name of the app and the current SOX value. That's all working fine.

The issue I'm running into is that, while I can get the current value using {{object.SOX}}, I can't get the automation to recognize the previous value. If someone updates SOX from "False" to "True" for example, I can see that it's now "True", but I don't know that it was previously "False". Because of this I can't have the automation trigger only when the SOX attribute changes, it triggers when any update is made to a business app.

I've found some documentation that suggests things like {{object.SOX.oldValue}} or {{fieldChange.fromString}} but haven't been able to get them working. I also found this solution (https://confluence.atlassian.com/jirakb/find-the-previous-attribute-values-when-using-object-updated-trigger-in-an-automation-rule-1155164218.html) but that seems very complicated for what should be a simple task. How am I supposed to reference the previous value?

Thank you!

1 answer

1 accepted

0 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2024

Hi @Michael Gormley 

Welcome.

Unfortunate, the KB article is you only option.

There is no smart value for previous value.

You can look at this community post, but this only relates to non Assets.

https://community.atlassian.com/t5/Jira-questions/How-do-I-get-the-value-that-was-added-to-the-Multiple-User/qaq-p/2767499 

So I don't think this post will apply in this case, as the change log is based on information in field information on issues, not assets

Michael Gormley October 17, 2024

Thanks Marc! I was hoping there was an easier way but I'll work through the KB article.

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events