JIRA 4.3 : How do I get a handle to the model (issues) then iterate?
This page last changed on Feb 22, 2010 by andreask@atlassian.com.
All of the objects defined externally to these methods are available to a JIRA plugin via dependency injection. /** * Retrieve a list of all the issues in the current project. Note that several of these objects are passed via * dependency injection as constructor parameters. * * @return list of Issue objects */ public List<Issue> getAllIssuesInCurrentProject() { final JqlQueryBuilder builder = JqlQueryBuilder.newBuilder(); builder.where().project(currentProjectId); Query query = builder.buildQuery(); try { final SearchResults results = searchService.search(authenticationContext.getUser(), query, PagerFilter.getUnlimitedFilter()); return results.getIssues(); } catch (SearchException e) { log.error("Error running search", e); } return Collections.emptyList(); } |
![]() |
Document generated by Confluence on Mar 27, 2011 18:55 |