As in summary, we have a script which takes a JQL string as input and outputs the list of issues matching the JQL. When we use the 'issuefunction in' jql function, no results are returned.
What could be a potential root cause
The script calls an utility function - returning a list of issues. (Not sure what the new answers will do with the next piece of code) When we run another query like 'project = MRM and resolution is empty', the query runs fine. {code} class SearchUtil { private static Logger log = Logger.getLogger(SearchUtil.class); private static SearchService searchService = ComponentAccessor.getComponent(SearchService.class); /* * Search issues based on the JQL query string. * Return an empty list if no results - or an error when processing the query */ public static List<Issue> doQuery(User adminUser, String queryString) { ParseResult parseResult = searchService.parseQuery(adminUser, queryString); if (parseResult.isValid()) { try { SearchResults results = searchService.search(adminUser,parseResult.getQuery(), PagerFilter.getUnlimitedFilter()); if (results != null) { log.debug("Found ${results.getTotal()} results"); return results.getIssues(); } log.debug("Found null results"); } catch (SearchException e) { log.error("Error running search", e); } } else { log.warn("Error parsing jqlQuery: " + parseResult.getErrors()); } return []; } } {code}
OK, I don't see why that would not work. Certainly works in the latest version. I need the script to reproduce, maybe you are trying to run as anonymous or something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, * JIRA v6.1.3#6158-sha1:b5b5eab / Script Runner Version: 2.1.16 * no log output * sample involved function: {noformat}issueFunction in issueFieldExactMatch("project = MRM and type = Requirement", "Mrmref", "^170"){noformat} Mrmref is a custom field (Text) @Francis Martens (iDalko) will be able to provide more details (script, ..) later
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any log output? What versions? Can you create a small script that exhibits the problem to share?
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.