Forums

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

Have any recommendations for parsing the {{changelog}} string in Automation rule?

Patrick Davis
Contributor
April 14, 2023

Hi there-

 

One of the automation rules I'm working on is triggered with any of 4 specific fields are changed on an issue. Upon that change, an email is fired and I would like to indicate which of those fields changed.

The current jankiness I'm using looks like this:


{{initiator.displayName}} just made a change to {{issue.key}}.

{{changelog}}

Click below to visit the issue in Jira
{{issue.url}}

 

I do get the changelog in the email -- it's formatted this way:

 

{Start date=[ChangeItemBean{fieldId='x', field='Start date', fieldType='null', from='2023-03-27', fromString='27/Mar/23', to='2023-02-01', toString='1/Feb/23'}]}

and I'm wondering if I could clean this up to be more readable by extracting the from and to properties along with the field name at the beginning. If there are multiple fields that can trigger this rule, is there a technique to dynamically know which field was changed or otherwise extract that from the changelog?

Have you successfully done this? Interested in learning how.

2 answers

1 accepted

0 votes
Answer accepted
Vikrant Yadav
Community Champion
April 15, 2023

Hi @Patrick Davis Try to get Old value and new value of Start Date using below smartvalue :-

Old Value -- {{changelog.duedate.from}}
New Value -- {{changelog.duedate.to}}

 

Replace duedate with Start date

Thanks,

Vikrant Yadav

Patrick Davis
Contributor
April 17, 2023

Thanks for the reply. This would work great if the rule knew which field was updated when interpreting the changelog values. In this case, there are 4 different fields that can trigger this rule when they are changed.

Like Maren Meyer likes this
Vikrant Yadav
Community Champion
April 17, 2023

@Patrick Davis  For this you can try to add 4 rule for 4 different fields, or you can add 4 changelogs smart value for each field.  

kristine.daniels
Contributor
April 30, 2023

In this thread comments, there is an example of iterating through a webresponse in a branch.  You might be able to do something similar
https://community.atlassian.com/t5/Jira-Service-Management/how-to-iterate-and-compare-webresponse-values/qaq-p/1991231

Like Vikrant Yadav likes this
0 votes
Dan Knapton May 13, 2025

Is the changelog considered a text field?  Will any of the text functions work on it?

Bill Sheboy
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.
May 13, 2025

Hi @Dan Knapton 

As this is a very old thread, please create a new question to ensure the maximum number of people see it to offer suggestions.  Thanks!

Until we see your new question...some of the changelog and fieldChange smart values available inside of rules are plain text while others are structured objects.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events