JiraRestClient Search Not Working for JQL Query with Epic Link

Abel Ubilla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 18, 2021

Hi,

I'm querying the Jira REST API and I'm not able to get the children of an Epic Link.

I want to list all fields of all issues that are children of a Project that's marked as an Epic with the following query:

https://jira.myowndomain.com/rest/api/2/search?fields=*all&maxResults=999&jql=project%20=%20BI%20cf[10508]%20in%20('PRJ-900')

In my case, Epic Link is the custom field 10508, and I can query with this cf on the Jira UI with my personal account. When I try to do the same with a different account that was set with readonly permissions to use the API, I get the following:

"No issues have a parent epic with key or name 'PRJ-900'"

I've seen a similar issue here and I tried checking what permissions this read only user has by calling: 

com.atlassian.jira.rest.client.api.MyPermissionsRestClient.getMyPermissions()

My implementation looks like this:

MyJiraRestClient myJiraRestClient = new MyJiraRestClient();
MyPermissionsInput myPer = new MyPermissionsInput(null, null, "PRJ-900", null);
Promise<Permissions> permission = myJiraRestClient.getMyPermissionsRestClient().getMyPermissions(myPer);

And the response I got was:

"Permissions"{
"permissionMap="{
"VIEW_WORKFLOW_READONLY=Permission"{
id=45,
"key=VIEW_WORKFLOW_READONLY",
"name=View Read-Only Workflow",
"description=admin.permissions.descriptions.VIEW_WORKFLOW_READONLY",
"havePermission=false"
},
"CREATE_ISSUES=Permission"{
id=11,
"key=CREATE_ISSUES",
"name=Create Issues",
"description=Ability to create issues.",
"havePermission=false"
},
"VIEW_DEV_TOOLS=Permission"{
id=29,
"key=VIEW_DEV_TOOLS",
"name=View Development Tools",
"description=Allows users in a software project to view development-related information on the issue",
"such as commits",
"reviews and build information.",
"havePermission=false"
},
"BULK_CHANGE=Permission"{
id=33,
"key=BULK_CHANGE",
"name=Bulk Change",
"description=Ability to modify a collection of issues at once. For example",
"resolve multiple issues in one step.",
"havePermission=false"
},
"CREATE_ATTACHMENT=Permission"{
id=19,
"key=CREATE_ATTACHMENT",
"name=Create Attachments",
"description=Users with this permission may create attachments.",
"havePermission=false"
},
"DELETE_OWN_COMMENTS=Permission"{
id=37,
"key=DELETE_OWN_COMMENTS",
"name=Delete Own Comments",
"description=Ability to delete own comments made on issues.",
"havePermission=false"
},
"WORK_ON_ISSUES=Permission"{
id=20,
"key=WORK_ON_ISSUES",
"name=Work On Issues",
"description=Ability to log work done against an issue. Only useful if Time Tracking is turned on.",
"havePermission=false"
},
"PROJECT_ADMIN=Permission"{
id=23,
"key=PROJECT_ADMIN",
"name=Administer Projects",
"description=Ability to administer a project in Jira.",
"havePermission=false"
},
"COMMENT_EDIT_ALL=Permission"{
id=34,
"key=COMMENT_EDIT_ALL",
"name=Edit All Comments",
"description=Ability to edit all comments made on issues.",
"havePermission=false"
},
"ATTACHMENT_DELETE_OWN=Permission"{
id=39,
"key=ATTACHMENT_DELETE_OWN",
"name=Delete Own Attachments",
"description=Users with this permission may delete own attachments.",
"havePermission=false"
},
"WORKLOG_DELETE_OWN=Permission"{
id=42,
"key=WORKLOG_DELETE_OWN",
"name=Delete Own Worklogs",
"description=Ability to delete own worklogs made on issues.",
"havePermission=false"
},
"CLOSE_ISSUE=Permission"{
id=18,
"key=CLOSE_ISSUE",
"name=Close Issues",
"description=Ability to close issues. Often useful where your developers resolve issues",
"and a QA department closes them.",
"havePermission=false"
},
"MANAGE_WATCHER_LIST=Permission"{
id=32,
"key=MANAGE_WATCHER_LIST",
"name=Manage Watchers",
"description=Ability to manage the watchers of an issue.",
"havePermission=false"
},
"VIEW_VOTERS_AND_WATCHERS=Permission"{
id=31,
"key=VIEW_VOTERS_AND_WATCHERS",
"name=View Voters and Watchers",
"description=Ability to view the voters and watchers of an issue.",
"havePermission=false"
},
"ADD_COMMENTS=Permission"{
id=15,
"key=ADD_COMMENTS",
"name=Add Comments",
"description=Ability to comment on issues.",
"havePermission=false"
},
"COMMENT_DELETE_ALL=Permission"{
id=36,
"key=COMMENT_DELETE_ALL",
"name=Delete All Comments",
"description=Ability to delete all comments made on issues.",
"havePermission=false"
},
"CREATE_ISSUE=Permission"{
id=11,
"key=CREATE_ISSUE",
"name=Create Issues",
"description=Ability to create issues.",
"havePermission=false"
},
"DELETE_OWN_ATTACHMENTS=Permission"{
id=39,
"key=DELETE_OWN_ATTACHMENTS",
"name=Delete Own Attachments",
"description=Users with this permission may delete own attachments.",
"havePermission=false"
},
"DELETE_ALL_ATTACHMENTS=Permission"{
id=38,
"key=DELETE_ALL_ATTACHMENTS",
"name=Delete All Attachments",
"description=Users with this permission may delete all attachments.",
"havePermission=false"
},
"ASSIGN_ISSUE=Permission"{
id=13,
"key=ASSIGN_ISSUE",
"name=Assign Issues",
"description=Ability to assign issues to other people.",
"havePermission=false"
},
"LINK_ISSUE=Permission"{
id=21,
"key=LINK_ISSUE",
"name=Link Issues",
"description=Ability to link issues together and create linked issues. Only useful if issue linking is turned on.",
"havePermission=false"
},
"EDIT_OWN_WORKLOGS=Permission"{
id=40,
"key=EDIT_OWN_WORKLOGS",
"name=Edit Own Worklogs",
"description=Ability to edit own worklogs made on issues.",
"havePermission=false"
},
"CREATE_ATTACHMENTS=Permission"{
id=19,
"key=CREATE_ATTACHMENTS",
"name=Create Attachments",
"description=Users with this permission may create attachments.",
"havePermission=false"
},
"EDIT_ALL_WORKLOGS=Permission"{
id=41,
"key=EDIT_ALL_WORKLOGS",
"name=Edit All Worklogs",
"description=Ability to edit all worklogs made on issues.",
"havePermission=false"
},
"SCHEDULE_ISSUE=Permission"{
id=28,
"key=SCHEDULE_ISSUE",
"name=Schedule Issues",
"description=Ability to view or edit an issue""s due date., havePermission=false
}, CLOSE_ISSUES=Permission{id=18, key=CLOSE_ISSUES, name=Close Issues, description=Ability to close issues. Often useful where your developers resolve issues, and a QA department closes them., havePermission=false
}, SET_ISSUE_SECURITY=Permission{id=26, key=SET_ISSUE_SECURITY, name=Set Issue Security, description=Ability to set the level of security on an issue so that only people in that security level can see the issue., havePermission=false
}, SCHEDULE_ISSUES=Permission{id=28, key=SCHEDULE_ISSUES, name=Schedule Issues, description=Ability to view or edit an issue""s due date.",
"havePermission=false"
},
"WORKLOG_DELETE_ALL=Permission"{
id=43,
"key=WORKLOG_DELETE_ALL",
"name=Delete All Worklogs",
"description=Ability to delete all worklogs made on issues.",
"havePermission=false"
},
"COMMENT_DELETE_OWN=Permission"{
id=37,
"key=COMMENT_DELETE_OWN",
"name=Delete Own Comments",
"description=Ability to delete own comments made on issues.",
"havePermission=false"
},
"ADMINISTER_PROJECTS=Permission"{
id=23,
"key=ADMINISTER_PROJECTS",
"name=Administer Projects",
"description=Ability to administer a project in Jira.",
"havePermission=false"
},
"DELETE_ALL_COMMENTS=Permission"{
id=36,
"key=DELETE_ALL_COMMENTS",
"name=Delete All Comments",
"description=Ability to delete all comments made on issues.",
"havePermission=false"
},
"RESOLVE_ISSUES=Permission"{
id=14,
"key=RESOLVE_ISSUES",
"name=Resolve Issues",
"description=Ability to resolve and reopen issues. This includes the ability to set a fix version.",
"havePermission=false"
},
"VIEW_READONLY_WORKFLOW=Permission"{
id=45,
"key=VIEW_READONLY_WORKFLOW",
"name=View Read-Only Workflow",
"description=Users with this permission may view a read-only version of a workflow.",
"havePermission=false"
},
"ADMINISTER=Permission"{
id=0,
"key=ADMINISTER",
"name=Jira Administrators",
"description=Ability to perform most administration functions (excluding Import & Export",
"SMTP Configuration",
"etc.).",
"havePermission=false"
},
"GLOBAL_BROWSE_ARCHIVE=Permission"{
id=-1,
"key=GLOBAL_BROWSE_ARCHIVE",
"name=Browse Archive",
"description=Ability to browse all archived issues.",
"havePermission=false"
},
"MOVE_ISSUES=Permission"{
id=25,
"key=MOVE_ISSUES",
"name=Move Issues",
"description=Ability to move issues between projects or between workflows of the same project (if applicable). Note the user can only move issues to a project he or she has the create permission for.",
"havePermission=false"
},
"TRANSITION_ISSUES=Permission"{
id=46,
"key=TRANSITION_ISSUES",
"name=Transition Issues",
"description=Ability to transition issues.",
"havePermission=false"
},
"EDIT_SPRINT_NAME_AND_GOAL_PERMISSION=Permission"{
id=-1,
"key=EDIT_SPRINT_NAME_AND_GOAL_PERMISSION",
"name=Edit Sprints",
"description=Ability to edit sprint name and goal.",
"havePermission=false"
},
"SYSTEM_ADMIN=Permission"{
id=44,
"key=SYSTEM_ADMIN",
"name=Jira System Administrators",
"description=Ability to perform all administration functions. There must be at least one group with this permission.",
"havePermission=false"
},
"DELETE_OWN_WORKLOGS=Permission"{
id=42,
"key=DELETE_OWN_WORKLOGS",
"name=Delete Own Worklogs",
"description=Ability to delete own worklogs made on issues.",
"havePermission=false"
},
"BROWSE=Permission"{
id=10,
"key=BROWSE",
"name=Browse Projects",
"description=Ability to browse projects and the issues within them.",
"havePermission=false"
},
"EDIT_ISSUE=Permission"{
id=12,
"key=EDIT_ISSUE",
"name=Edit Issues",
"description=Ability to edit issues.",
"havePermission=false"
},
"MODIFY_REPORTER=Permission"{
id=30,
"key=MODIFY_REPORTER",
"name=Modify Reporter",
"description=Ability to modify the reporter when creating or editing an issue.",
"havePermission=false"
},
"EDIT_ISSUES=Permission"{
id=12,
"key=EDIT_ISSUES",
"name=Edit Issues",
"description=Ability to edit issues.",
"havePermission=false"
},
"MANAGE_WATCHERS=Permission"{
id=32,
"key=MANAGE_WATCHERS",
"name=Manage Watchers",
"description=Ability to manage the watchers of an issue.",
"havePermission=false"
},
"EDIT_OWN_COMMENTS=Permission"{
id=35,
"key=EDIT_OWN_COMMENTS",
"name=Edit Own Comments",
"description=Ability to edit own comments made on issues.",
"havePermission=false"
},
"ASSIGN_ISSUES=Permission"{
id=13,
"key=ASSIGN_ISSUES",
"name=Assign Issues",
"description=Ability to assign issues to other people.",
"havePermission=false"
},
"BROWSE_PROJECTS=Permission"{
id=10,
"key=BROWSE_PROJECTS",
"name=Browse Projects",
"description=Ability to browse projects and the issues within them.",
"havePermission=false"
},
"VIEW_VERSION_CONTROL=Permission"{
id=29,
"key=VIEW_VERSION_CONTROL",
"name=View Development Tools",
"description=Allows users to view development-related information on the view issue screen",
"like commits",
"reviews and build information.",
"havePermission=false"
},
"START_STOP_SPRINTS_PERMISSION=Permission"{
id=-1,
"key=START_STOP_SPRINTS_PERMISSION",
"name=Start/Complete Sprints",
"description=Ability to start and complete sprints.",
"havePermission=false"
},
"WORK_ISSUE=Permission"{
id=20,
"key=WORK_ISSUE",
"name=Work On Issues",
"description=Ability to log work done against an issue. Only useful if Time Tracking is turned on.",
"havePermission=false"
},
"COMMENT_ISSUE=Permission"{
id=15,
"key=COMMENT_ISSUE",
"name=Add Comments",
"description=Ability to comment on issues.",
"havePermission=false"
},
"WORKLOG_EDIT_ALL=Permission"{
id=41,
"key=WORKLOG_EDIT_ALL",
"name=Edit All Worklogs",
"description=Ability to edit all worklogs made on issues.",
"havePermission=false"
},
"CAN_ASSIGN_TESTRUN_PERMISSION=Permission"{
id=-1,
"key=CAN_ASSIGN_TESTRUN_PERMISSION",
"name="[
"Xray"
]"Override Assign Test Runs",
"description=Allows users to set the Test Run assignee without the Edit Issues and Assign Issues permissions.",
"havePermission=false"
},
"EDIT_ALL_COMMENTS=Permission"{
id=34,
"key=EDIT_ALL_COMMENTS",
"name=Edit All Comments",
"description=Ability to edit all comments made on issues.",
"havePermission=false"
},
"DELETE_ISSUE=Permission"{
id=16,
"key=DELETE_ISSUE",
"name=Delete Issues",
"description=Ability to delete issues.",
"havePermission=false"
},
"MANAGE_SPRINTS_PERMISSION=Permission"{
id=-1,
"key=MANAGE_SPRINTS_PERMISSION",
"name=Manage Sprints",
"description=Ability to manage sprints.",
"havePermission=false"
},
"USER_PICKER=Permission"{
id=27,
"key=USER_PICKER",
"name=Browse Users",
"description=Ability to select a user or group from a popup window as well as the ability to use the""share""issues feature. Users with this permission will also be able to see names of all users and groups in the system.",
"havePermission=false"
},
"CREATE_SHARED_OBJECTS=Permission"{
id=22,
"key=CREATE_SHARED_OBJECTS",
"name=Create Shared Objects",
"description=Ability to share dashboards and filters with other users",
"groups and roles.",
"havePermission=false"
},
"ATTACHMENT_DELETE_ALL=Permission"{
id=38,
"key=ATTACHMENT_DELETE_ALL",
"name=Delete All Attachments",
"description=Users with this permission may delete all attachments.",
"havePermission=false"
},
"DELETE_ISSUES=Permission"{
id=16,
"key=DELETE_ISSUES",
"name=Delete Issues",
"description=Ability to delete issues.",
"havePermission=false"
},
"MANAGE_GROUP_FILTER_SUBSCRIPTIONS=Permission"{
id=24,
"key=MANAGE_GROUP_FILTER_SUBSCRIPTIONS",
"name=Manage Group Filter Subscriptions",
"description=Ability to manage (create and delete) group filter subscriptions.",
"havePermission=false"
},
"RESOLVE_ISSUE=Permission"{
id=14,
"key=RESOLVE_ISSUE",
"name=Resolve Issues",
"description=Ability to resolve and reopen issues. This includes the ability to set a fix version.",
"havePermission=false"
},
"SERVICEDESK_AGENT=Permission"{
id=-1,
"key=SERVICEDESK_AGENT",
"name=Service Desk Agent",
"description=Allows users to interact with customers and access Service Desk features of a project.",
"havePermission=false"
},
"ASSIGNABLE_USER=Permission"{
id=17,
"key=ASSIGNABLE_USER",
"name=Assignable User",
"description=Users with this permission may be assigned to issues.",
"havePermission=true"
},
"TRANSITION_ISSUE=Permission"{
id=46,
"key=TRANSITION_ISSUE",
"name=Transition Issues",
"description=Ability to transition issues.",
"havePermission=false"
},
"COMMENT_EDIT_OWN=Permission"{
id=35,
"key=COMMENT_EDIT_OWN",
"name=Edit Own Comments",
"description=Ability to edit own comments made on issues.",
"havePermission=false"
},
"MOVE_ISSUE=Permission"{
id=25,
"key=MOVE_ISSUE",
"name=Move Issues",
"description=Ability to move issues between projects or between workflows of the same project (if applicable). Note the user can only move issues to a project he or she has the create permission for.",
"havePermission=false"
},
"WORKLOG_EDIT_OWN=Permission"{
id=40,
"key=WORKLOG_EDIT_OWN",
"name=Edit Own Worklogs",
"description=Ability to edit own worklogs made on issues.",
"havePermission=false"
},
"DELETE_ALL_WORKLOGS=Permission"{
id=43,
"key=DELETE_ALL_WORKLOGS",
"name=Delete All Worklogs",
"description=Ability to delete all worklogs made on issues.",
"havePermission=false"
},
"LINK_ISSUES=Permission"{
id=21,
"key=LINK_ISSUES",
"name=Link Issues",
"description=Ability to link issues together and create linked issues. Only useful if issue linking is turned on.",
"havePermission=false"
}
}
}

What permissions might I be missing?

0 answers

Suggest an answer

Log in or Sign up to answer