Hi,
I am using the following query to show projects that has links.
issueFunction in linkedIssuesOf("project = xxx")
What should i do to get the negate of this query, meaning, I want to list all jira issues which doesnt have a link to project xxx. I tried the following but scriptrunner doesnt like the syntax
NOT (issueFunction in linkedIssuesOf("project = xxx"))
or
!( issueFunction in linkedIssuesOf("project = xxx"))
Hi Ashwin,
Thank you for your question.
I can confirm that calling not in on issue function is invalid as the issueFunction in linkedIssuesOf() function is protected as this is required to invoke the enhanced search mechanism that the JQL provides.
This means that you need to leave the function call as it is and place the not keyword before the call is made in order to retrieve the inverse results from the search.
This means that your example query above should be structured to use the syntax shown below.
not issueFunction in linkedIssuesOf(<SubQueryHere>)
I can confirm that you can see more detailed information on how the Enhanced Search functions work inside of Jira Cloud in the documentation page located here.
You can also see more details on the differences between the cloud and server versions of the add-on in the documentation page located here
If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.
Regards,
Kristian
No, "not in" is perfectly valid (at least in Jira Server). But, so is "not issueFunction ..."
These two queries produce the exact same result set:
issueFunction not in linkedIssuesOf("project = BR")
not issueFunction in linkedIssuesOf("project = BR")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Payne,
I can confirm that not in is valid inside of Jira Server but inside of Jira Cloud the ScriptRunner search functions work differently and must be run on the Enhanced Search page due to the fact that we run the queries in a sandbox environment due to the restricted nature of Jira Cloud.
The Enhanced Search functionality works as mentioned in my previous reply and does not support using issueFunction not in like you can do in Jira Server.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gotcha; thanks for clarifying. Ashwin didn't state whether he's running Server or Cloud, but it may well be Cloud.
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.
not issueFunction in linkedIssuesOf
perfectly works. Thanks Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what i get when I use (i replaced xxx with correct project name)
issueFunction not in linkedIssuesOf("project = xxx")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That looks different than my search screen on Jira Server. Are you running Jira Cloud? Or are you on a different screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try issueFunction not in, i.e.
issueFunction not in linkedIssuesOf("project = xxx")
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.