Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SearchResults class in Jira 8 ??

Albert Cameron September 29, 2021
SearchResults results = searchService.search(user, query, PagerFilter.getUnlimitedFilter());

I am on Jira 8 . I am using SearchResults Class.

It was easy with Jira 7. There was a method getIssues().

But now on Jira 8 there is only method getPages() oder getResults(). Both return a List with no further information. A raw List , not with a specific dataType .

So I really do not know how to get the issues now. 

 

I just found out SearchResult is also generic. 

Maybe this is possible:

SearchResults<Issue> results = searchService.search(user, query, PagerFilter.getUnlimitedFilter());

But does Jira query not always return Issue Object? 

1 answer

1 accepted

0 votes
Answer accepted
Martin Bayer [MoroSystems, s.r.o.]
Community Champion
September 29, 2021
Martin Bayer [MoroSystems, s.r.o.]
Community Champion
September 29, 2021

And example of the code is:

https://library.adaptavist.com/entity/perform-a-jql-search-in-scriptrunner-for-jira

It is in groovy but it is not so difficult to write the same in Java :)

Suggest an answer

Log in or Sign up to answer