Forums

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

{{fieldChange.fromString}} and {{fieldChange.toString}} not working

Saira
Contributor
August 10, 2023

Anyone able to retrieve the name of the field updated using smart values? They don't work for me

2 answers

0 votes
Saira
Contributor
August 10, 2023

here you go

Saira
Contributor
August 10, 2023

Screen Shot 2023-08-10 at 9.25.35 PM.png

0 votes
Trudy Claspill
Community Champion
August 10, 2023

Hello @Saira 

Is that exactly how you are using them, and expecting to get the name of the field that changed? That is not a correct expectation.

Referring to the documentation those smart values will give you the value in the field before and after it was changed.

If you show use the full automation rule and point out where and how you are trying to use the value then we can offer you more specific advice.

Saira
Contributor
August 10, 2023

So basically I'm adding a comment in the automation when the Jira is updated -  like this: 

 

{{issue.key}}'s {{fieldChange.field}} field was updated from {{fieldChange.fromString}} to {{fieldChange.toString}} by {{initiator.displayName}}

 

but it prints this: 

INC-3718's field was updated from to by Saira Nawaz

so Jira ID and initiator's name are displayed, but not the to and from field values or the updated field's name

Trudy Claspill
Community Champion
August 10, 2023

Please show us the entire rule. The construction of the rule often reveals the cause of the rule to not behave as you expect.

Additionally if you review the documentation for which I provided the link you will see that field is not an available attribute for the {{fieldChange}} smart value.

Saira
Contributor
August 10, 2023

Screen Shot 2023-08-10 at 9.25.35 PM.png

Trudy Claspill
Community Champion
August 10, 2023

With the Issue Updated trigger, multiple fields' values may have been changed. If multiple fields' values changed, do you want to report the before and after values of every one of those fields?

Are you wanting to report only the changed values for specific fields?

What problem are you solving by adding a comment to document the before and after values when a field is updated? That information is already recorded in the issue history and available for viewing by viewing the History tab in the issue.

Mari Pervushina
Contributor
July 28, 2024

Hello. I have simmular issue. I can use expressions {fieldChange.fromString}} and  {{fieldChange.toString}}, but i can't get added values for multipl user picker fields. Did you now how i can get difference between {{fieldChange.toString}} and {fieldChange.fromString}} if fields are type multipl user picker.

Trudy Claspill
Community Champion
July 28, 2024

I have replied on your original post 

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

Yours is a "similar" issue to this post only in that it concerns getting the changed value of a field through an automation. Otherwise it is different because you are using a different hosting type and yours concerns a multiple selection field. You were correct to start a separate Question.

Plus this question is almost a year old, and the only people who see your addition to it are the original post author and responders. Starting a new Question gets you better visibility for it in the Community.

Like Mari Pervushina 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