We created a NEW subtask called 'defect-task' for our projects so users can now differentiate between a sub-task or defect-task under an issue. However, we would like have a count under the parent of the number of defect-tasks. Using automation, I was able to count the total number of subtasks under any given parent using {{issue.subtasks.size}} but the result also includes sub-task counts.
You can do that either using Lookup Issues with a JQL filter or with smart value, list filtering and a math operation. Here are some references to help you try those methods:
Kind regards,
Bill
Thanks Bill... Great resources but can you be more specific on how to resolve my particular problem with examples?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Certainly, and...using automation rules is often about experimentation and learning. There really isn't anything in documentation that covers every scenario.
Let's try Lookup Issues...In your rule, it appears to be triggered on one of your Defect-tasks. And so you could find all siblings with JQL such as this:
project = {{triggerIssue.project}} AND parent = {{triggerIssue.parent}} AND issueType = Defect-task
Using that with the Lookup Issues action would gather them, and then the count would be:
{{lookupIssues.size|0}}
I added a default value of 0 just in case there are none.
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.