Finding a more efficient way to fetch the users associated with all projects and issues

Moxarth Rathod January 4, 2024

My use case is to fetch all users associated with all projects and issues present in the Jira software.

Consider having the large data present in the Jira software

Here is the method I am using to fetch permissions for projects:

Fetching project permission is still not a time-consuming task, the real nightmare is to fetch permissions for issues.

I am using the below way to fetch issue permission:

  1. If an issue security scheme is present, I am using /rest/api/2/issue/{issue_key}?fields=security endpoint which returns a security schema applied to the specific issue.
  2. Once, we get the issue security scheme, the next target is for scheme members and that is achieved via https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-schemes/#api-rest-api-3-issuesecurityschemes-level-member-get.
  3. This point is applied if issue security schema is not present/applied for an issue, the parent permission means the project's permission is inherited to the issue.

This is how we fetch the users for issues and it looks simple in the first place. But the problem arrives when there are thousands of issues available in projects, the API calls, in that case, are at peak.

Assuming we have 50 projects and each has 1000 issues then the total API calls for fetching issue permission is 50000 which slows down the resultant code.

Question: Is there a better approach to minimize the API calls or improve this method of fetching users/actors for projects and issues?

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2024

@Moxarth Rathod Great question.  There is not a better way of doing this other than using an app.  The marketplace has a couple of apps like EasyBI that you might take a look at.  This way you could write reports that you could just go an pull that would have the information instead of writing an app to pull the information every time.  

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events