Hi, I'm using Jira Cloud in a company-managed project and trying to calculate the progress percentage of parent issues based on the status of their child issues in Jira Automation.
Here's what I'm aiming to do:
- Trigger the rule when a child issue is created, edited, or deleted.
- Use the trigger to get the parent issue key.
- If the parent exists, count the child issues using the "Count issues using JQL" API: Count issues using JQL API.
The reason I am using the REST API is that the Lookup Issues action in Jira Automation has a limit of 100 issues. I have some initiatives with more than 100 epics, so I need to bypass that limitation. - The API works fine when I use cURL, and it returns the correct count.
- However, when I attempt to use this API in Jira Automation, the count value returned is always 0.
Request payload:
headers
Accept: Application/JSON
Content-Type: Application/JSON
custom data
{"jql": "project=kdev and parent={{triggerissue.parent.key}}"}
or
{"jql": "project=kdev"}
Response payload:
{ "count": 0 } // count is always 0, response status is 200 = success
Even though I know there are issues that match the JQL query, the response count is always 0 when used in Jira Automation.
Has anyone successfully implemented this, or can provide guidance on how to get the correct count of child issues through Jira Automation?
Any help would be greatly appreciated!