Calculated field in the cloud

Chris
Contributor
December 23, 2022

I've got two custom fields:

1. Consequence

2. Probability

Both of which are a numerical value from 1-5.

I'll be making a third custom field that should show the result of fields 1 and 2 multiplied.

I've been reading about some workarounds for calculation in Cloud instances, but they're mostly about counting transitions through a workflow. 

Has anyone here done such a setup before, or have any advice?

I've already been through the suggestions here but haven't been able to sort this out yet.

6 answers

1 accepted

2 votes
Answer accepted
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 23, 2022

Hello @Chris 

As suggested in the Atlassian article, this can be achieved using Automation.

The steps to set up the Automation are as:

  • Go to Project Settings
  • From the left-hand menu, select Automation
  • Click on 'Create Rule' on the right-hand side top
  • For the trigger, select the option 'Field value changed'
  • Select the required fields under 'Fields to monitor for changes'
  • Click Save
  • Select 'New Action'
  • Select 'Edit issue'
  • From the Drop Down, select the third custom field
  • Click on 3 dots and select 'SET'
  • Add: {{issue.Consequence.value}}*{{issue.Probability.value}}
  • Click Save, Add the name of the rule and enable it

Please find below the snapshot for a similar rule.

Kindly accept the answer if this helps.

--GG

Multiply.jpg

Bill Sheboy
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.
December 23, 2022

Hi @Gaurav 

I believe the mathematical operators are needed for that to work in a rule:

{{#=}}{{issue.Consequence.value}}*{{issue.Probability.value}}{{/}}

Kind regards,
Bill

Like # people like this
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 27, 2022

@Bill Sheboy absolutely right!1 We do need the operators.

0 votes
Jonas Kopka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 6, 2024

Stumbled over this in 2024 - the .value part is no longer needed (this actually made the automation not work)

Previous, not wokring query:

{{#=}} {{issue.Confidence.value}} * {{issue.Ease.value}} {{/}}

Working:

{{#=}} {{issue.Confidence}} * {{issue.Ease}} {{/}}

 

Thanks for the existing help!

Best,

Jonas

 

Bill Sheboy
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.
September 8, 2024

Hi @Jonas Kopka -- Welcome to the Atlassian Community!

The Jira version (Cloud, Server, or Data Center) of automation, the field type, and the project type can impact when the value attribute is needed in rule math operations.  For example, it appears some of the JPD fields may use the value as the default attribute rather than the selection id.  My hypothesis for JPD is this is related to their calculated field handling in the views.

Kind regards,
Bill

0 votes
Chris
Contributor
December 26, 2022

I'll give the automation a try and report back. Thanks for the input!

Chris
Contributor
December 27, 2022

The automation works! BTW I used the values offered by @Bill Sheboy in conjunction with the automation setup from @Gaurav .

Thanks all!

0 votes
Vedant Kulkarni_Trundl
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.
December 23, 2022

@Chris , you can try the JMWE addon which provides the functionality of event triggers using which you can calculate the field values.

fieldValue_JMWE.JPG

0 votes
Frederik December 23, 2022

Hi,

Isn't it possible for you to use a field (not custom) you don't use ?

I'm doing something similar with storypoint :

sum all the story points of issues in an epic when a value changes

" {{lookupIssues.Story points.sum}} "

and that value is edited into a custom field : calculated total SP

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 23, 2022

Hi @Chris ,

calculated custom fields is currently not an available feature on the cloud.

My suggestion is to try to put in place an automation and smart values (https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/)

Take a look here for similar question https://community.atlassian.com/t5/Jira-Software-questions/Automation-Average-calculation/qaq-p/2102128

Hope this helps,

Fabio

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