Dear All,
Thank you in advance. Does anyone know how to schedule the summing of subtasks to tasks on a daily basis? I do not need it per change, but I do want it to run on a daily basis to look for all subtasks and then sum it up and replace the task story points.
Right now I have the "component may be incompatible" error.
Thank you!
AT
Hello @Amanda TAY
You are getting the warning because branching to a related issue (the Parent issue) requires that your rule already have an issue in focus. The Lookup Issues action retrieved a list of issues but does not put the rule focus on any of the retrieved issues.
You can add a JQL to your Schedule trigger to select issues that would be parents of subtasks.
That puts those issues in focus for the rule. The remainder of the rule components will run for each issue retrieved by the trigger.
The second step would be to use a Lookup Issues action to retrieve the subtask for the issues from the trigger using the JQL
Parent ={{issue.key}} and issuetype = Sub-task
Next I would add a smart value Condition to check that the Lookup actually retrieved issues:
{{lookupIssues.size|0}} is greater than 0
Then follow that with an Edit Issue action. This will apply to the Parent issues found by the JQL in the trigger.
In this action you can choose the Story Points field from the "Choose fields" pull down. In the accompanying entry field you can type in the smart value {{lookupIssues.Story Points.sum}}
Hi Trudy,
Thank you! I have tried to put what you mentioned into the automation, but i didnt really get the part about the adding of the smart value connection to check that the Lookup works.
Here is what i have set up now, is it on the right track?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to build a JQL filter/statement that will select the parent issues you care about. Test this out by building the JQL through the View All Issues/Search for Issues screen under the filters menu.
1. Once you get the filter you want, copy it to the JQL field in the Scheduled trigger.
2. Uncheck the box below that field.
Maybe a filter like this, where you provide the Project Key and the list of all issues types that might have subtasks.
3. Use a Lookup Issues action to lookup the subtasks of the issues retrieved by the JQL in the trigger. You have this step.
4. Remove the "For Parent" component.
5. Insert a Smart Value Condition to check that the Lookup found some issues.
6. Use an Edit issue action to set the Story Points field to the sum of the found issues from the Lookup Issues action.
The second, third, and fourth components of this rule will run separately for each issue found by the JQL in the trigger, finding each issue's subtasks and setting the Story Points field for each issue to the sum of Story Points in its subtasks.
Note that there are limitations on how many issues can be processed in rules. A Scheduled trigger can retrieve no more than 1000 issues. Combine that with the Lookup Issues action and a total of no more than 5000 issues can be retrieved in the entire run of this rule. If you have more parent issues + all their subtasks, your rule will need refining or you may need two rules that use slightly different JQLs in the triggers to get smaller sets of issues to evaluate.
If you are new to Automation Rules I recommend that you avail yourself of the free, on-demand training on that topic available at https://university.atlassian.com
https://university.atlassian.com/student/catalog/list?search=jira+automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Amanda TAY
Rather than looking at subtasks and pushing story points up to Parents, why not try it the other way round?
In your schedule JQL try something like:
Project = MyProject and Type = Task and statuscategory != Done
Then for your next condition use IF {{smartvalues}} condition
{{issues.subtask.size}}
does not equal
0
and finally Edit Issues
Story Points
=
{{issue.subtasks.Story points.sum}}
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 don't even need the IF statement, without it all that happens is that the task story points is set to 0 rather than none
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With Scheduled, you will have to specify the JQL. Since there is no issue trigger, you are getting the error in the way lookup is being used.
Note that there is a limit to number of rows that can be handled via JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Thank you. Too many automations, and we just don't need feedback that quickly. Why at subtask, because of how the team does their planning today, where they have a tendency to breakdown the tasks to subtasks when they have the visibility on what they need to do. It is not the best practice, but it is what works for the team.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.