Hello,
Trying to run calculation on initiatives child issues (going over each epic children and combining all the child issues to determine SP progress). For initatives with less than a 100 tickets - the loopupissue works great, but for bigger ones im left with no solution.
Was thinking to use REST API to query jira with JQL (Something like:
parent in portfolioChildIssuesOf({{issue.parent.key}}) and "story points" > 0 )
Thought about this one :
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-jql-match-post but it requires list of ticket IDs and i cant provide that upfront.
any ideas? or a better approch?
thanks
For future refernce, I started with a webhook step using REST API approximate-count call to deternmine how many tickets are under the initiative.
Then, started to run lookupissue step chunks based on the the number of tickets i have in total, note that you will need to order the tickets to make sure you keep the alignment. I used this :
parent in portfolioChildIssuesOf({{issue.parent.key}}) and "story points" > 0 ORDER BY key ASC
Now, when i know how many tickets i have i saved {{myKey}} varaible per @Benjamin suggestion :
{{if(equals(lookupIssues.size, 0), "outOfScopeKey", lookupIssues.last.key)}}
(As I am breaking the flow to chunks, all you need is actually just lookupIssues.last.key)
And now all is left is to calculate the Done SP and the total SP. if number of tickets is higher than 100, you should run, save the results under a variable and run again with the limitation of <{{myKey}}.
HI @Gilad Waldman ,
There isn't a direct way that I have seen. This post may provide another option for you.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Benjamin
This is a good approch for me, but I have just one last question - I created Else-If rule that based on the number of tickets this initiative holds, run the flow, but i cant find a way to count the number of tickets this initiative holds.
Any recommendation here?
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.
Short answer: the only ways I know to do this with the REST API or an automation rule is divide-and-conquer, such as sum first at the Epic level and then sum the Epics. You could also build your own app to page through repeated calls to the REST API endpoints.
More information...
The 100 issue limit is from the REST API endpoints, which automation rule actions such as Lookup Issues rely upon. There are new bulk-get search REST API endpoints to get up to 5000 issue id values: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get But as soon as fields other than the id are added to the results, the 100 issue limit applies.
And so one possible workaround is to first sum the values at the Epic level (assuming they have 100 child issues, or fewer) and then sum to the Initiative level by summing the Epics. This approach requires multiple automation rules with different triggers / conditions to avoid running into other service limits, such as looped execution:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.