Sum select list values in Automation rule

Mauricio Miño October 27, 2021

Hello,

I want to setup a rule that every time a custom field changes, it will add the value of that field and another field and put the result in a third field.

The two values to add come from a custom simple select list with numerical values.

In the automation wizard I added an action that updates my third field with the sum of the two fields as such:

{{issue.customfield_13900}}+ {{issue.customfield_13901}}

The rule executes correctly but I'm not seeing the sum displayed in my field.

I'm guessing I need to add something extra to retrieve the selected value from my custom field lists?

Any help is much appreciated.

Thanks!

1 answer

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.
October 28, 2021

Hi Mauricio,

I suspect that it is not being added because the custom field is not a number type field for your select list. 

Mauricio Miño October 28, 2021

Thanks for your answer John.

Is there a way to work with select lists and do the operation I mentioned?
I want to keep the field with a list of fixed values to avoid user error.

Or is there a way to make the options of the list be a number type? I don't see an option to modify this within the custom field options.

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.
October 28, 2021

You should be able to set a variable for the value in the dropdown and then use the variable field in your calculation. 

https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Createvariable

Mauricio Miño October 28, 2021

Thanks John, that worked!

Like John Funk likes this
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.
November 6, 2021

Great! Glad to hear it.

Suggest an answer

Log in or Sign up to answer