Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,739
Community Members
 
Community Events
176
Community Groups

Jira Automation, trigger fields changing, access to {{fieldChange}} for every field

I have an automation rule that triggers on fields change (2 fields). This rule have to prevent unauthorized field changing every of this fields (or both).

I have an action, that update this two fields values with {{fieldChange.fromString}}. 

I suppose that for every field there is own context of {{fieldChange}}, but actually it seems that variable {{fieldChange}} contains only first changed field value. As a result, when one field changes, both fields get the same value.

How to access in action to old value for every field independently?

 

2 answers

1 vote
John Funk Community Leader Mar 23, 2021

Hi @Егоров Виктор ,

I don't know if this helps or not, but this is what I use:

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

Hi John, your example does not work today

on an "Issue updated" trigger, while updating the "Description" field

 

It becomes

 XXX-NNN's field was updated from to by XXXX.

Hi @Elton Lau -- Welcome to the Atlassian Community!

Would you please post images of your complete rule and of the audit log details showing the execution?  That may provide some context for the community to offer suggestions.  Thanks!

Kind regards,
Bill

the fieldChange.field, fieldChange.fromString, fieldChange.toString, are all EMPTY STRING

Thanks for that information.

When you look at the issue change history for TES-214 what was the change that triggered the rule?  I recall that some changes can trigger Issue Updated, but that they are not tracked in a manner which shows in the change history.

And, some context setting questions:

Are you using Jira Cloud or Jira Server/Data Center?

What type of project is this: company-managed, team-managed, etc.?

  1. I triggered it by changing the "Description"
  2. Jira Cloud
  3. It's a team-managed project

Hi @Elton Lau 

I just reproduced your results with both company-managed and team-managed projects.  It appears something has changed for both {{changelog}} and {{fieldChange}} with the latter one now returning JSON...but which cannot be dereferenced by attribute name (e.g. fromString) unless you explicitly select a field (e.g. description)

I suggest working with your site admin to submit a support ticket for this symptom if you are on a paid Jira license: https://support.atlassian.com/contact/#/

When you hear back from them, please post what you learn to help the community.  Thanks!

Like John Funk likes this

Have you checked out {{changelog}}?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events