Forums

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

Record multiple field value changed at workflow transition screen using jira automation

Idiyana February 26, 2025

I have created and automation rule to track value changes for few custom fields. these fields can be updated during workflow transition. it can be update either only one field or multiple fields at a time. 

there is no issue if i only update 1 field. but, if i update more than one field, it only recorded 1 field changed. 

can someone help me with this rule? 

record fields changes.png

result: image.png

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
February 27, 2025

Hello @Idiyana 

The {{fieldChange}} smart value gives you access to only one field that changed, not all fields that changed during a transition.

To access multiple fields that changed during a transition you need to use the {{changelog}} smart value, and you need to explicitly reference each field; i.e.

{{changelog.Development Start Date.toString}}

{{changelog.Development End Date.toString}}

{{changelog.QAT End Date.toString}}

 

Idiyana March 2, 2025

this is the smart value setup to update the field. besides recording the fields changes, i also want to record the time, actor and comment when the transition happened. where can i insert the smart value for the explicit reference?

{{issue.Timeline Update Changelog}}
-------------------------------
{{#fieldChange}}{{now.format("yyyy-MM-dd HH:mm")}}:
{{initiator.displayName}} changed {{fieldChange.field}}: {{fieldChange.fromString}} → {{fieldChange.toString}} because of {{comment.body.last}}{{/fieldChange}}

Trudy Claspill
Community Champion
March 2, 2025

If you want record each of the fields that changed you will have to reference them explicitly, as I detailed in my previous response. Attempting to use the following to iterate through all the changed fields will NOT WORK.

{{#fieldChange}}
{{/fileldChange}}

You can add the changed field values and the information from the last comment added to the field thus:

{{issue.Timeline Update Changelog}}
-------------------------------
{{now.format("yyyy-MM-dd HH:mm")}}:
{{initiator.displayName}} changed
{{changelog.Development Start Date.fromString}} >> {{changelog.Development Start Date.toString}}
{{changelog.Development End Date.fromString}} >> {{changelog.Development End Date.toString}}

continue to explicitly list the fields...

because of
{{issue.commens.last.body}}

 

Idiyana March 2, 2025

Thanks  @Trudy Claspill it works

Trudy Claspill
Community Champion
March 2, 2025

If my responses I provided helped you develop a solution, please consider clicking the Accept Answer button above my responses.

Idiyana March 3, 2025

Hi @Trudy Claspill i have one more question on this. is it possible if i want to hide those fields without changes? i try not to make it look too messy Timeline Changelog.png

Trudy Claspill
Community Champion
March 4, 2025

Look at the Conditional Logic documentation:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

{{#if(not(equals(changelog.Development Start Date.fromString,changelog.Development Start Date.toString)))}} 
Development Start Date:
{{changelog.Development Start Date.fromString}} >> {{changelog.Development Start Date.toString}}
{{/}}
Idiyana March 4, 2025

Thanks. you've helped me again

Like Trudy Claspill 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