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

Possible to do the Add/Subtract the number based upon on fields.

Santhosh March 21, 2024

We have a project with some fields of adding and it needs to be updated to a specific field ?

For example:
Need to find the total spent Amount.

Now I have fields like.

  • Spent on Foods 
  • Spent on Goods & Services.
  • Spent on other Miscellaneous

I have these fields in Number field.
For now, I need to add all the spent above and make it as total spent and it needs to be updated in Total Spent field.

Also for Subtraction I need idea ?


Is there anything possible for achieving it ?

2 answers

1 vote
Kalyan Sattaluri
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.
March 21, 2024

Hello @Santhosh 

Please take a look at below link, especially the first section about math expressions.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

You can simply add/subtract like you would any expression.

{{#=}}{{issue.Spent on Foods}} + {{issue.Spent on Goods & Services}} - {{issue.Spent on other Miscellaneous}} * 5 {{/}}

Hope it helps.

 

 

Santhosh March 21, 2024

Sorry. Since I haven't tried it.

May I know where to apply this .
If I'm using that, where to Update the formula 
{{#=}}{{issue.Spent on Foods}} + {{issue.Spent on Goods & Services}} - {{issue.Spent on other Miscellaneous}} * 5 {{/}}

Is it in the field or the context or let me know if you could help me please ?

Kalyan Sattaluri
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.
March 21, 2024

Hello @Santhosh 

Apologies, I assumed too much.

Starting fresh, for a requirement like yours, (that is update a field based on something else), usual approach is to set up an automation rule.

This rule, depending on your requirement, can be set up to be run on a schedule (daily/weekly etc) or, listen to field changes such as if someone updated "Spent on Foods" fields, then the rule to run and udpate the total accordingly.

So with that as a background, if you are not familiar with Jira automation, I would suggest you spend some time looking into it and once familiar, we can then work to update your rule so it does what you want.

But because this requires Automation rule execution, I dont want to suggest you the rule unless you are clear on what it is and what to do.. because it costs money. So please review below link and let us know any questions.

 

https://www.atlassian.com/software/jira/guides/automation/overview#what-is-automation

So please review 

0 votes
Dexter de Vera
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.
March 21, 2024

Hi @Santhosh ,

You need to create Jira Automation.

When: Field change - add the 3 spend fields

Then: Edit field - select Total Spent field 

-Write the smartvalue below in the field.

{{#=}}{{issue.Spent on Foods}} + {{issue.Spent on Goods & Services}} + {{issue.Spent on other Miscellaneous}}{{/}}

Suggest an answer

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

Atlassian Community Events