SearchRequest incompatibilities between Jira 3 and 5

I have the following piece of code from Jira 3.13

I need to convert this to use the api in 5.1.8 but, I'm having trouble determining how to do this now that both

the SearchRequest class and search() method now expect a Query and ResolutionParameter/UserParameter are no

longer available.

Any help is greatly appreciated.

private final static SearchSort SORT_ORDER = new SearchSort(NavigableField.ORDER_DESCENDING, IssueFieldConstants.PRIORITY);

private final static SearchSort SORT_ORDER2 = new SearchSort(NavigableField.ORDER_ASCENDING, IssueFieldConstants.CREATED);

private final static Collection<SearchSort> DEFAULT_SEARCH_SORTS = Arrays.asList(SORT_ORDER2, SORT_ORDER);

final SearchRequest sr = new SearchRequest(user.getName());
sr.addParameter(new UserParameter(DocumentConstants.ISSUE_ASSIGNEE, user.getName()));
final SearchResults result;
try {
result =, user, PagerFilter.getUnlimitedFilter());


1 answer

0 vote
Timothy Chin Community Champion May 21, 2013

You would need to refer to this documentation as the framework has changed alot.

This is a sample code:

JqlClauseBuilder jqlClauseBuilder = JqlQueryBuilder.newClauseBuilder();
Query query = jqlClauseBuilder.project(projectId).and().issueType("Epic").buildQuery();
query = jqlClauseBuilder.orderBy().addSortForFieldName(PRIORITY, SortOrder.ASC, true).buildQuery();
query = builder.buildQuery();
searchResults =, query, PAGER_FILTER);

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted yesterday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

153 views 12 3
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot