how can i display all issues belong to a filter??

Lamrani April 22, 2012

Hi every one,

this code good :

--------------------------------------------------------

ComponentManager cm = ComponentManager.getInstance();
User user = cm.getJiraAuthenticationContext().getLoggedInUser();

SearchRequestService srs=cm.getSearchRequestService();

Collection<SearchRequest> filters=srs.getFavouriteFilters(user);

if (!filters.isEmpty()){
for(SearchRequest f:filters){
String filterName=f.getName();
log.info("Filter Name "+filterName);
}

}
else log.info("Filters vide");

-----------------------------------------------------------

as far as now i can retreive all favourite filters, but i want retreive all issues belong to each filter

how can i modify this code to retreive all issues bolong to each filter

thanks

1 answer

1 accepted

0 votes
Answer accepted
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 22, 2012
String filter= "filter= \"" + filterName + "\"";
SearchService searchService = ComponentManager.getInstance().getSearchService();

ParseResult parseResult = searchService.parseQuery(authenticationContext.getUser(), filter);

SearchResults results=searchService.search(user,parseResult.getQuery(),PagerFilter.getUnlimitedFilter());

 List&lt;Issue&gt; issues = results.getIssues();

Lamrani April 22, 2012

Thank you very much,

it works

Suggest an answer

Log in or Sign up to answer