In the UI, edit the query in the advanced edit.
If you mean in code, create a new query and save it over the top of the old one.
Could you please be more precisely? Which methods do I need to change the filter's query. I want to put a String into Query and set it in the filter's setter method like:
String query = "project = Example And ..." // Put that String in Query q SearchRequest filter = ... filter.setQuery(q);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I got the answer. That's my code:
JqlQueryParser parser = ComponentAccessor.getComponent(JqlQueryParser.class); String queryString = ...; Query q = null; try { q = parser.parseQuery(queryString); } catch (JqlParseException e) { e.printStackTrace(); } SearchRequest filter = ...; filter.setQuery(q);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://confluence.atlassian.com/display/JIRA040/How+to+search+in+a+plugin
Looks old, but the code is still mostly valid, and the approach is the same for 5 and 6
Ah, crossed posting, sorry!
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.