The following query:
issueFunction in issuesInEpics("issueFunction in linkedIssuesOf(\"issue in (CO-4)\",'Parent Collection Of')")
Returns the error: Error in the JQL Query: Expecting either 'OR' or 'AND' but got '"'. (line 1, character 18)
I have access to a server version of Jira with Scriptrunner and this same format does resolve correctly to give results.
If I remove the \ characters, giving me:
issueFunction in issuesInEpics("issueFunction in linkedIssuesOf("issue in (CO-4)",'Parent Collection Of')")
The error changes to: Failed to get issues in epic
So I think I solved this specific one by changing to this:
issueFunction in issuesInEpics(issue in linkedIssues (CO-4, "Parent Collection Of"))
Basically I am not needing to use a scriptrunner function within a subquery of a scriptrunner function. With that said, I would like to understand if that would in fact be supported.
Hi John,
I can confirm that ScriptRunner for Jira Cloud does not support nesting an enhanced search function that it provides inside of the subquery of another enhanced search function which means you will be unable to achieve doing this inside of Jira Cloud.
Regards,
Kristian
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.
Hi John,
I have checked and can confirm that although you cannot directly nest queries that as a workaround you can first to create a query to return the results from the enhanced search function which you want to nest and can save this as a filter with a unique name.
You can then create a second query which calls this saved filter inside of the subquery of enhanced search function that you want to nest it in, in order to return all the issues for the filer you saved previously.
For your reference, I can confirm that the JQL that you would use in the subquery to return the results of the filter is filter = <NameOfFilterHere>.
An example of this would be similar to below where I have given the example syntax to show how to return issues from another filter inside the issueInEpics function.
issueFunction in issuesInEpics("filter =<FilterNameHere>")
I hope this information helps.
Regards,
Kristian
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.
Is it still valid, that:
I can confirm that ScriptRunner for Jira Cloud does not support nesting an enhanced search function that it provides inside of the subquery of another enhanced search function
I was able to achieve it. Maybe you can test it and change the accepted answer accordingly :)
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot seem to nest anything for conditionals in Jira Cloud JQL enhanced.
example that is invalid: "... AND (this query OR that query)"
Only this works but pretty sure that is not nested queries: "... AND this query OR that query"
Real example that is valid:
PROJECT = "SEC" AND labels != "high" AND status != "DONE" AND issueFunction in issueFieldMatch("PROJECT = "SEC"", "description", "cvssScore: 7.\*") OR issueFunction in issueFieldMatch("PROJECT = "SEC"", "description", "cvssScore: 8\.*")
Attempted nested example that is invalid - note the open and close parentheses to nest the JQL enhanced queries:
PROJECT = "SEC" AND labels != "high" AND status != "DONE" AND (issueFunction in issueFieldMatch("PROJECT = "SEC"", "description", "cvssScore: 7.\*") OR issueFunction in issueFieldMatch("PROJECT = "SEC"", "description", "cvssScore: 8\.*"))
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.