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

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

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();

Thank you very much,

it works

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

Mission-critical battery manufacturer fulfills FAA software requirements with Commit Policy Plugin

EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...

127 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you