Hello,
To provide some context, in our cloud instance, we have created a custom single select field called 'Sub-Portfolio Manager'. I am trying to automate a notification to an appropriate team whenever the custom field (Sub-Portfolio Manager) is changed. However, I'm not able to successfully achieve Changed From and Changed To values.
I'm using the following smart values in the Content section of my Automation Rule body:
Date of Change: {{updated}}
Initiative Name: {{issue.summary}}
Sub-Portfolio Manager Changed From: {{#changelog.customfield_10287}} {{fromString.asText}} {{/}}
Sub-Portfolio Manager Changed To: {{#changelog.customfield_10287}} {{toString.asText}} {{/}}
Initiative ID: {{issue.customfield_10304}}
Current year $: {{issue.customfield_10123}}
Hi Jugal - Welcome to the Atlassian Community!
What is working and what is not working? What is the result when you run it?
Hello John,
Thank you for your response.
What am I trying to achieve?
What is not working?
Date of Change: 2024-05-20T16:50:15.8+0000
Initiative Name: Pega Upgrade-Prime - V8.8.4 - Jugal
Sub-Portfolio Manager Changed From:
Sub-Portfolio Manager Changed To:
Initiative ID: 11154
Current year $:
Your help is appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the additional information. Try just using this:
{{fieldChange.fromString}}
{{fieldChange.toString}}
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.
Great! Glad that worked for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jugal Doshi
Is your trigger "Field Value Change"?
Cause if its not, then you wont get any values.
But if it is "Field Value Change".. all below should work:
Please log these values and share screenshot if your rule / audit log
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kalyan,
Thank you for your response.
Yes, the trigger is Field Value Change. I've attached two screenshots
1) My Rule
2) Output Value
I'm still not seeing values being populated for 'Sub-Portfolio Manager Changed From' and 'Sub-Portfolio Manager Changed To'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jugal Doshi
When using {{ChangeLog}} smart values, you have to reference the field by the screen name. Referencing the field by Customfield does not work.
So if you change your syntax to {{changelog.Your Field.toString}} it will work.
NOTE: Field name has to be exactly as is on screen. Dont replace spaces etc.
You can see this when you go to the end point to look at how changelog is captured,
https://yourdomain.net/rest/api/2/issue/ABC-61?expand=changelog
fields are referenced by screen names.
Hope it helps. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course other option is to use {{fieldChange.toString}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Kalyan.
I tried the {{fieldChange.fromString}} and {{fieldChange.toString}} properties and it worked.
Thank you for all your help :)
Warm regards,
Jugal
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.