List<Issue> getIssuesFromProject(Long projectId) throws SearchException {
JqlQueryBuilder builder = JqlQueryBuilder.newBuilder();
builder.where().project(projectId);
builder.orderBy().addSortForFieldName("STRINGVALUE", SortOrder.ASC, true);
Query query = builder.buildQuery();
SearchResults results = ComponentManager.getInstance().getSearchProvider().search(query,ComponentAccessor.getJiraAuthenticationContext().getUser(), PagerFilter.getUnlimitedFilter());
return results.getIssues();
}
In above codei want to get issue for given project ID and order by customfield value in asccending order.
"STRINGVALUE" is the column name of customfieldvalue table of jira where value of customfield store
but its not working can anyone tell me what is wrong in it or is any other way to get issue orderby of value of customfield