Example:
There are two custom fields as "Dev Estimation" and "QA Estimation". I want to sum this with conditions like if the sum is greater than equals to 1 and less than equals to 3, then need to update the Story points field as 1.
Tried this with below logics using smart value but getting error. Please let me know how to achieve the same. PS: do not want to create one custom field to store the summed value. I am using JIRA cloud.
{{#if(and(((issue.Dev Estimation) + (issue.QA Estimation)).gte(1),((issue.Dev Estimation) + (issue.QA Estimation)).lte(3)))}}(issue.Story Points = 1) {{/}}
Welcome to our Community.
Please try to use a {Create variable} action to store the sum of dev & QA estimations:
{{#=}}{{issue.Dev Estimation|0}} + {{issue.QA Estimation|0}}{{/}}
Then use if-else condition to edit the value of Story points.
Hope it helps & Thanks,
YY哥, Atlassian Certified Expert
Cloze Tech, China
Hi @YY Brother Thank you for the response. The Create variable is working fine. But not able to update the Story points. I want below logic to work and if you can help me. Also please find the rules I am using, Please let me know if this is the correct way.
{{#if(and(TotalEstimation.gte(1),TotalEstimation.lte(2)))}} {{issue.Story Points.Value = 1}} {{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good news! It's pleasure @Sabyasachi Samal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To assist with automation rule questions, context is needed. Please post the following to help the community offer suggestions:
Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy Thanks for your response. Please find the rule details I am using. It is executed successfully but the Story Points field is not updating properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information.
The "more options" and "additional fields" sections of the Edit Issue Action use JSON, as described here: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
However you should not need those for your scenario, as the field could be selected from the dropdown list and then set using a smart value expression.
Your expressions are incorrect for setting the field. Please review the documentation for conditional logic: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
Also, Created Variables are text, and so must be converted to number values with asNumber to be used as you show: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#asNumber
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rule you now show is very different from your original approach, and is incorrect for different reasons.
As you appear to have already solved the need using if / else conditions, perhaps use that approach and remove this other rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have changed based on suggestions. Tried different possible ways but finally the if/else works. Thank you for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.