Hello 
I'm using a Java Client to access Jira API.
I've managed to do a search and retrieve all the Epics from a certain project from JIRA and I've noticed that SearchResult.getIssues() returns information as BasicIssue, not Issue. In order to retrieve it as Issue I have to make an extra call.
Is there a way that I could retrieve the information using JQL directly as Issue?
My Code right now:
public List<Issue> readAllEpicsFromProject(String projectKey) {
log.info("call readAllEpicsFromProject");
List<Issue> issues = new ArrayList<>();
NullProgressMonitor pm = new NullProgressMonitor();
SearchResult searchJql = restClient.getSearchClient()
.searchJql("project = \"" + projectKey + "\" AND issueType = epic", pm);
for (BasicIssue issue : searchJql.getIssues()) {
issues.add(restClient.getIssueClient().getIssue(issue.getKey(), pm));
}
return issues;
}