Hi all!
I am developing a plugin and I have the next problem:
- I retrieving from a user a JQL string like this: "project = DEMO"
- then I want to retrieve JSON with issues, but I can retrieve only List<Issue>
example:
String query = "project = DEMO";
Query conditionQuery = jqlQueryParser.parseQuery(query);
ApplicationUser searcher = jiraAuthenticationContext.getUser();
SearchResults results = searchService.search(searcher, conditionQuery, PagerFilter.getUnlimitedFilter());
List<Issue> issues = results.getIssues();
Object SearchResult is similar to JSON, retrieving from the link:
http://localhost:2990/jira/rest/api/2/search?jql=project+%3D+DEMO
This JSON is what I need. But I can’t understand how I can get it. Maybe somebody can give me advice - how to convert SearchResult to JSON, or maybe there is another way to get the JSON I need?
SORRY, this should be correct now:
project = BOLOGNA AND (status changed FROM "x" to "Z" BEFORE "2012/09/28" or status changed FROM "y" to "Z" BEFORE "2012/09/28")
:)
Are you getting an error, or is the search recognized as valid but has no results?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And, if there is no error, can you confirm that both statuses "x" and "y" go directly to "z"? because that is the functionality of changed (went directly from A to B). Instead, are you wanting to search for an issue that was in "x" at some point, or "y" at some point, and at another point was in "z"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fiddled around, I think you want this:
project = BOLOGNA AND (status WAS "x" BEFORE "2012/09/28" and status was "Z" BEFORE "2012/09/28" or status WAS "y" BEFORE "2012/09/28" and status was "Z" BEFORE "2012/09/28")
let me know if that works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.