Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automate Story points field to populate as SUM of two other fields in the Jira issue

Andrews Rohit Dean August 1, 2022

Hi,

I am trying to achieve the following task in the Jira automation.

I have two custom fields (number type) in the Jira issue. I am trying to set up automation such that the field 'Story Points' should populate as the sum of these two custom fields.

Currently, my automation rule looks as follows and I'm stuck here:

Capture.PNG

Thank you in advance for helping me sort this out.

1 answer

1 accepted

1 vote
Answer accepted
Vikrant Yadav
Community Champion
August 1, 2022

Hi @Andrews Rohit Dean  Welcome to Atlassian Community!

Are you trying to update Story points on issue creation? OR want to update story point field when any change in number field value ?

In Edit Issue Field Action >> Select Story points field and Insert following value , kindly replace custom field id with your number field id . 

{{#=}}{{customField_10029}} + {{customField_10030}}{{/}}

 

Thanks

V.Y

Andrews Rohit Dean August 1, 2022

Thanks, Vikrant, I want the story points field to update whenever there is any change in the custom number fields value.

Let me try your suggested solution. Thanks again.

 

Regards,

Andrews

Vikrant Yadav
Community Champion
August 1, 2022

Okay, @Andrews Rohit Dean In both cases same mathematical operations works. 

I hope this helps to answer your question. 

Andrews Rohit Dean August 1, 2022

@Vikrant Yadav Thanks for the formula and it works fine, except when the value of any of my custom fields is 'none' (when the user has not provided any value). In such a case, the automation fails.

Can the formula somehow be updated to consider the value 'none' equivalent to zero?

 

Regards,

Andrews

Like Vikrant Yadav likes this
Vikrant Yadav
Community Champion
August 1, 2022

Great! Glad to hear it works for you. 

For this, kindly apply condition before Action, When Field 2 is empty in that case it is failing. Apply condition like when Field2  . Like when it's empty set value to 0.

Thanks

Vikrant Yadav
Community Champion
August 1, 2022

Hi @Andrews Rohit Dean  PFA Attach solution with each steps :- 

Update Else block.PNGUpdate IF Block.PNGCreate var.PNGIf Block.PNG

Kindly mark solution as Accepted if it works for you, it helps other users who is looking for the same solution. 

Like Andrews Rohit Dean likes this
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.
August 1, 2022

Hi @Andrews Rohit Dean 

Rather than using the conditional logic to test for empty fields, smart values allow you to specify a default value when they are empty.  For example, this will default the values to 0:

{{#=}}{{customField_10029|0}} + {{customField_10030|0}}{{/}}

Kind regards,
Bill

Like # people like this

Suggest an answer

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

Atlassian Community Events