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

Add up values from different fields with multiple selection

Daniel Pfeffer
Contributor
December 23, 2024 edited

Hello Community

I am trying to create an automation to calculate the sum of different fields (see below) that have a multiple selection with a scale of 0 - 3. The scale is structured as follows in each field:

0 - No
1 - Partially
2 - Yes

Objective: The sum of the selected scales is calculated in a field, i.e. only the 1st digit of the scale is taken into account.

23-12-2024_14-18-01.jpg

Question: Is such automation even possible and if so, how?

23-12-2024_14-36-43.jpg

23-12-2024_14-37-10.jpg

I would be very happy if someone from the community could help me.

Kind regards

Daniel

1 answer

1 accepted

1 vote
Answer accepted
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, 2024

Hi @Daniel Pfeffer 

For the multiple-select option field you show, the values have a digit in the first character.  That could be extracted using the left() function.  And then the list of values could be joined together for including in a math expression.

For example:

{{#=}} 0{{issue.myCustomField.value.left(1).join(" + ")}} {{/}}

I added a default value of zero at the front in case no values are selected.  As one of your values is "0 - Nein" you may want to change that.

 

Kind regards,
Bill

Daniel Pfeffer
Contributor
January 6, 2025

Hi @Bill Sheboy 

Many thanks for the tip. Unfortunately, I can't get this automation to work as I'm still new to Jira.

Can you also give me a tip on how to set up the automation workflow for this case? I have searched the forum, but unfortunately I have not found a comparable case.

It would help me a lot.
Best regards
Daniel

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.
January 6, 2025

After substituting in your field's smart value (or custom field ID) in the expression I provided, you may copy-and-paste that directly into the field as the sum.  To confirm the smart value (or custom field ID) for your field, please use this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

 

The rule you show is branching to the parent.  Are you trying to sum the fields from the trigger issue, the children of the parent, or something else?

Daniel Pfeffer
Contributor
January 9, 2025

Hi @Bill Sheboy 

Thanks to your help, I have now been able to set up the automation. Thank you very much for your support.

Here is the solution to the problem:

10-01-2025_07-57-51.jpg

Like • Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events