Our team only points stories, but not tasks. Although not perfect, I'd like to create automation to figure out the number of stories marked with a certain component (we use Dev, Config, and QA) and assign a portion of the points based on the number of tasks.
So if there are 4 config tasks on a story and 2 points of Config work (we track that in a custom field), then it would assign each task .5 points.
I was heading down the path of creating a custom variable called ConfigTaskTotal that counts the number of tasks with a component of config, but then once I get there, I can't figure out how to use it to divide the field that holds config points by that number. Hoping to just do it simply within a smart field like this, but it doesn't work.
{{#=}}{{issue.customfield_10879/ConfigTaskTotal}}{{/}}
Any pointers would be greatly appreciated!
Hello @Brian Baldwin
Welcome to the Atlassian community.
Have you tried using the "divide" function?
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/#Divide
If that doesn't solve the problem please provide us with screen images that show the entire automation rule and the details of each step. Also, please show us the Audit Log for the rule execution. Tell us what result you are actually getting if it doesn't match your expectations. That will enable us to help you debug the rule.
Additionally, look into using the Log Action to print in the Audit Log values for fields and smart values that your are trying to use/modify to confirm that the values are what you expect them to be.
Hey Trudy,
Thanks for the reply, the funny thing is that I had tried it on Friday and it wasn't working, but copied and pasted my text from Friday today and Voila!
{{issue.parent.customfield_10797.divide(DevTaskTotal)}}
Not perfect but directionally accurate that it counts the number of subtasks with a component marker and uses that to allocate a slice of the points for the story to that task.
Query for the lookup in case someone is trying to do the same thing
issuetype = sub-task and component in (Development) and parent in ({{issue.parent.key}})
Then use lookupfilter.size to store it in the DevTaskTotal Variable
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.