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?
result:
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}}
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If my responses I provided helped you develop a solution, please consider clicking the Accept Answer button above my responses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.