I want to validation jql clause in java class.
Some thing like: I have a string "project = 10000"
I want to check it valid or invalid /( correct or uncorrect) jql.
How can I do that?
Thanks,
I found script to validation JQL:
ApplicationUser user = jiraAuthenticationContext.getLoggedInUser();
SearchService.ParseResult parseResult = searchService.parseQuery(user, jql == null ? "" : jql);
if (!parseResult.isValid()) {
return false;
}
final MessageSet result = searchService.validateQuery(user, parseResult.getQuery());
if (result.hasAnyErrors()) {
return false;
}
return true;
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.