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,555,754
Community Members
 
Community Events
184
Community Groups

Help with fields dynamic calculation formula

Edited

Good Morning,

I'm quite newbie to jira but spend two weeks already on this task without success - Im trying to create the automation which will be counting dynamically the following fields:

Screenshot_324.png

in the following way - PM is adding Implementation Value and testing value basis, then during the process if tester found mistakes he can add value to the "Tester's value by mistakes" field and if he is updating value there it should substract that value from field "Ticket Implmenetation Value" and show the sum of all three fields in FINAL TICKET VALUE

The main issue that if after the first change - we want to adjust the tester's value by mistake field it substracts again the same value from the ticket implementation value while we want it to adjust difference only with the previous value. Also if we want to correct/remove value from tester's value by mistake field to make sure its added back to the ticket implementation value field and calculate properly Final Value.

Just to sum up the requirements of the automation:
- If value to the "Tester's Value by mistakes" added first time - it should substract from field "Ticket Implementation Value"

- If the value in field "Tester's value by mistakes" corrected to the lower amount then it was first time - it should add the difference to the field "Ticket Implementation Value"

- If the value in field "Tester's value by mistakes" corrected to the higher amount then it was first time - it should substract the difference from the field "Ticket Implementation Value".

-All the time field final amount should show the same sum of all three values.

Can someone please help with this? Maybe there any kind of workaround?
Thank you in advance.

3 answers

1 accepted

1 vote
Answer accepted
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.
Apr 30, 2023

Hi Taras - Welcome to the Atlassian Community!

Can you share the currently rule that you have? Also with details showing how you are calculating the fields with automation. Then we can give advice from there. 

Thank you so much for answer!
Currently we have two rules (which are basically wrong as they aren't proprly calculating it):

1st: called  "
Tester's mistakes substraction automation" making calculation as following - if there is any change to "Tester's value by Mistakes (PLN)" field then make the following calculation: Ticket Implementation Value (PLN) equals {{#=}}{{issue.Ticket Implementation Value (PLN)}} - {{issue.Tester's Value by mistakes (PLN)}} {{/}}  
We want to update the field to Ticket implementation value to decrease be value provided in  tester's value.

2nd: called "FINAL TICKET VALUE CALCULATION" and triggers if there is any change to the fields: "Tester's value by mistakes (PLN)"; "Ticket Testing Value Basis (PLN)"; "Ticket Implementation Value (PLN)"  then to run the follwing calculation: FINAL TICKET VALUE (PLN) equals {{#=}}{{issue.Ticket Implementation Value (PLN)}} + {{issue.Tester's value by mistakes (PLN)}} + {{issue.Ticket Testing Value Basis (PLN)}} {{/}}

To sum up all these fields.

Thank you.

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.
May 02, 2023

Thanks for the information. But can you share actual screenshots of the rule? 

Hey John,

Sure if it will help - here are he two rules I've provided details previosuly:

1:Screenshot_327.png
Screenshot_328.png

2:Screenshot_329.png
Screenshot_330.png

Formulas pasted in my previous comment. If you need anything else - let me know.
Thank you in advance :) 

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.
May 04, 2023

And the rule is firing but not updating the field correctly? Or what is happening? 

I've described in the question itself what is wrong. In my opinion the formulas are wrong or maybe we will need to divide into several, they calculate properly first time. I need the suggestion here of how I can or maybe can't create needed functionality.

Copying from the description:

"

The main issue that if after the first change - we want to adjust the tester's value by mistake field it substracts again the same value from the ticket implementation value while we want it to adjust difference only with the previous value. Also if we want to correct/remove value from tester's value by mistake field to make sure its added back to the ticket implementation value field and calculate properly Final Value.

Just to sum up the requirements of the automation:
- If value to the "Tester's Value by mistakes" added first time - it should substract from field "Ticket Implementation Value"

- If the value in field "Tester's value by mistakes" corrected to the lower amount then it was first time - it should add the difference to the field "Ticket Implementation Value"

- If the value in field "Tester's value by mistakes" corrected to the higher amount then it was first time - it should substract the difference from the field "Ticket Implementation Value".

-All the time field final amount should show the same sum of all three values.
"

Kelly Arrey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 04, 2023

I tried replicating the example and I think I've got to the same place as @Taras Korobko.

I think what's needed is the ability to access both the previous value of "Tester's ..." and the changed value, but I haven't been able to figure out the syntax for that (if it's even possible). Anybody? Thanks

Like Taras Korobko likes this
Kelly Arrey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 04, 2023 • edited

Hi @Taras Korobko with some help from Atlassian support, I arrived at the following two rules:

The important parts are setting the values of the fields:

Rule 1:  Ticket Implementation Value (PLN):

{{#=}} {{Ticket Implementation Value (PLN)}} + {{fieldChange.fromString}} - {{fieldChange.toString}} {{/}}

Rule 2:  FINAL TICKET VALUE (PLN):

{{#=}} {{issue.Ticket Implementation Value (PLN)}} + {{Ticket Testing Value Basis (PLN)}} + {{Tester's value by Mistakes (PLN)}} {{/}}

| The key point is that {{fieldChange.fromString}} and {{fieldChange.toString}} refer to the
| field you're triggering off.

HTH, 

Kel

2023-05-04_14h39_23.png2023-05-04_14h39_56.png

2023-05-04_14h40_52.png2023-05-04_14h41_16.png

Like Taras Korobko likes this

@Kelly Arrey You are my hero!!! This worked out! :) Thank you so much!

Like # people like this

removed as wrongly posted

0 votes
Kelly Arrey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 02, 2023

Hi @Taras Korobko

If I understand correctly that:

  1. FINAL TICKET VALUE (PLN) is always the sum of the other three PLN fields
  2. The other three PLN fields, i.e., Ticket Implementation Value (PLN), Ticket Testing Value Basis (PLN), and Tester's value by mistakes (PLN), are all input values, i.e., not calculated,

Then I would write three rules:

  1. When Ticket Implementation Value (PLN) changes, calculate FINAL TICKET VALUE (PLN)
  2. When Ticket Testing Value Basis (PLN) changes, calculate FINAL TICKET VALUE (PLN)
  3. When Tester's value by mistakes (PLN) changes, calculate FINAL TICKET VALUE (PLN)

Or is there more processing that needs to happen? 

HTH,

Kel

Hi Kelly,

Ticket Implementation value can be changed by increase or decrease of Tester's value by Mistake field. 

So generally as I wrote above - if PM is adding Implementation Value and testing value basis, then during the process if tester found mistakes he can add value to the "Tester's value by mistakes" field and if he is updating value there - it should substract that value from field "Ticket Implmenetation Value" and show the sum of all three fields in FINAL TICKET VALUE

Thanks for asking, below I will provide the current rules as well:

Currently we have two rules:

1st: called  "
Tester's mistakes substraction automation" making calculation as following - if there is any change to "Tester's value by Mistakes (PLN)" field then make the following calculation: Ticket Implementation Value (PLN) equals {{#=}}{{issue.Ticket Implementation Value (PLN)}} - {{issue.Tester's Value by mistakes (PLN)}} {{/}}  
We want to update the field to Ticket implementation value to decrease be value provided in  tester's value.

2nd: called "FINAL TICKET VALUE CALCULATION" and triggers if there is any change to the fields: "Tester's value by mistakes (PLN)"; "Ticket Testing Value Basis (PLN)"; "Ticket Implementation Value (PLN)"  then to run the follwing calculation: FINAL TICKET VALUE (PLN) equals {{#=}}{{issue.Ticket Implementation Value (PLN)}} + {{issue.Tester's value by mistakes (PLN)}} + {{issue.Ticket Testing Value Basis (PLN)}} {{/}}

To sum up all these fields.

Thank you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events