I need to build a Query like "status changed to Closed before -1d" for my Jira plugin, but I am unable to find any suitable examples for how to build queries with history and I am now stuck.
I hope anyone of you can give me some pointers.
Thanks a lot in advance.
Community moderators have prevented the ability to post new answers.
Hi,
try this:
import com.atlassian.jira.bc.issue.search.SearchService; import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.web.bean.PagerFilter; SearchService searchService = ComponentAccessor.getComponent(SearchService.class); String jqlQuery = "status changed to Closed before -1d"; SearchService.ParseResult parseResult = searchService.parseQuery(user, jqlQuery); if (parseResult.isValid()) { query = parseResult.getQuery(); } else { log.error("Invalid JQL: " + jqlQuery); }
Henning
you mean sth like this?
<jira_host>/rest/api/2/search?jql=status changed to Closed BEFORE -1d
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh ok sorry. no idea then atm.
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.