Hi
I have a string like this
(project=MYTESTA and (fixversion="1.0.0" or affectedversion="1.0.0") ) or (project=MYTESTA and (fixversion="1.0.1" or affectedversion="1.0.1") )AND issuetype in(Defect,Enhancement) AND Severity in( 1-Critical,2-High,3-Low)
how do I execute this string in plugin and get back issues.
I am trying to see if Query or Querybuilder takes and string and execute and give me results.
Any pointers.
Please let me know.
Thanks
Abe
Query query = builder.sub().project("MYTESTA").and().sub().fixVersion("1.0.0").or().affectedVersion("1.0.0").endsub().endsub().or().sub().project("MYTESTA").and().sub().fixVersion("1.0.0").or().affectedVersion("1.0.0").endsub().endsub().issueType("Defect","Enhancement").and().customField(customfieldID).in("1-Critical","2-High","3-Low").buildQuery();
Thanks Nazia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SearchProvider searchProvider = ComponentManager.getInstance().getSearchProvider(); JqlClauseBuilder builder = JqlQueryBuilder.newClauseBuilder();
Query query = <your query>;
SearchResults searchResults = searchProvider.search(query, admin, PagerFilter.getUnlimitedFilter()); List<Issue> issues = new LinkedList<Issue>(); issues = searchResults.getIssues();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for the response.
Query query = <your Query>
How does it work.
Query query = "(project=mytesta)"
I cannot give like this. That is where I have difficulty, how do I construct Query object from my string.
Thanks
Abe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.