Retrieving Release Stories from JIRA API in Power BI

I’m working on connecting Power BI to JIRA and need help with getting the right data. I want to pull all user stories that belong to a particular release using JIRA’s REST API through Power BI’s web connector.

Right now I’m using a JQL query that looks something like this:
/rest/api/2/search?jql=project in (PROJ1) AND issuetype=Story&startAt=0&maxResults=100

But I’m running into a couple of issues. First, even though I set maxResults to 100, I’m getting way more records than expected. Second, I’m not sure if my JQL is properly filtering for stories within a specific release.

What’s the correct way to structure the JQL query to get only the stories from one release? Also, is there something I’m missing about how the pagination works with the startAt and maxResults parameters when using Power BI’s web connector?

try adding fixVersion to your JQL: project in (PROJ1) AND issuetype=Story AND fixVersion="your release name". powerBI can be tricky with pagination, it might load more than expected even with maxResults. look at the total count in the response to understand better.

Power BI’s behavior of making multiple API calls automatically is likely why you’re seeing this pagination issue. When JIRA indicates there are more results beyond your specified maxResults, Power BI will continue fetching until it retrieves everything. To correctly filter by release, include the fixVersion field in your JQL: /rest/api/2/search?jql=project in (PROJ1) AND issuetype=Story AND fixVersion="Release 1.0"&startAt=0&maxResults=100. Ensure to replace “Release 1.0” with your actual release name. Keep in mind that while maxResults controls the number of records per call, Power BI will pull in all results automatically unless you create custom M code to limit the total fetched records.

The pagination issue you’re experiencing is due to Power BI automatically handling JIRA’s paged responses. Essentially, when JIRA indicates that there are more records, Power BI continues making API calls and adjusts the startAt parameter to retrieve all records, which is why you are seeing more than 100 results despite setting maxResults to that value.

To filter by release, ensure you incorporate the fixVersion field in your JQL. However, do note that some organizations may employ unconventional naming for versions or assign multiple fix versions to a single story. If that’s the case, consider using fixVersion in (“Your Release Name”) to accommodate such scenarios. It’s also important to verify whether your team utilizes fixVersion for managing releases since some may have custom fields for this purpose.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.