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,638,557
Community Members
 
Community Events
196
Community Groups

Automationto compare two values and report of differences over a threshold

I have two custom number fields in my project. I would like an automation which alerts users if there is a difference between these two values of 0.05 or greater. Would someone be able to advise of the easiest way to do this or similar.

 

 

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 12, 2021

Hi Mitchell,

Here's what I would do. Create a new custom number field. 

Then when either one of the two current fields is updated, fire an automation rule to update the new custom number field. The edit for that field will look like this:

{{issue.customfield_16825.diff(now).days}}

Note - you can sub out the "now" part for another field if you like.

Then do a re-fetch of the issue.

Then add a condition that if the new number field is >= 0.05 then send an email to someone. 

Hopefully, that is enough to get you started. 

Hi John,

Thanks for your response. Sorry in advance I don't have much exeperience with smart values. What custom ID am I swapping out 16825 with?

Thanks

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 13, 2021

You can just use the name of the field like this:

{{issue.Field Name.diff(now).days}}

Just make sure it is exactly like your field name. 

To see the id of a field, go to Settings (gear icon) > Issues > Custom Fields

Then search for the field you want to see. 

Then click on the 3 dots menu on the right side and select Contexts and Default value.

Finally, you will see the field ID in the URL address in the browser.

Hi John, 

Sorry I wasn't quite clear. Which of the 3 custom field ID's am I swapping out with 16825? I have the two custom number fields which I want to find the difference between and then I also have the third custom field which you recommended to be created.

Thanks

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 14, 2021

What are the names of the two fields? And which one should be subtracted from the other? 

Hi John,

One is called radar and one is called acoustic. A user checks the measurements for each of those instruments and reports them in Jira against those two custom values. Both instruments should be recording an identical or similar value. Were wanting to be able to tell if there is something wrong with one of the instruments by having an automation trigger if there is a difference of 0.05 or more between either of them. So theoretically either of them could be subtracting from the other if one of the instruments is giving a false reading. So perhaps I would need to look for differences of both >=0.05 and >=-0.05?

Thanks

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 21, 2021

Hey Mitchell - Did you ever get this worked out? 

Hi John,

No I wasn't able too. I couldn't figure out how to write your rule.

If you can elaborate more on what needs to be done. That would be great.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 22, 2021

Sorry it took so long to get back to your before this. Do you have a rule started at all? Or do we need to look at it from scratch? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events