Hi,
In my app, once I enter a particular assignee, I should get list of all Epic JIRA numbers and sub-tasks under it. How do I query it using JIRA rest api? Please help me out.
Hi @Shashank
I'm not quite sure which items you're expecting to be assigned to the user, I'm assuming Epics here, but you can move the assignee bit around.
I would use the API call /rest/api/3/search (shown here in the documentation) and then pass in the correct JQL such as
/rest/api/3/search?jql=project=ABC and assignee=Fred and type=Epic
Replace ABC Fred with your project and assignee. This is the list of all epics assigned to the user.
Iterate through all the epics, extract the key and do another API call for each one, finding the subtasks, by
/rest/api/3/search?jql=parent=ABC-123
ABC-123 is the Epic key for each epic as you iterate through them all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.