I am trying to find all issues that do not have a test linked to it. I created an issueLinkType "Testers", with the two options "tests" and "is tested by". Now I would like to find any issues in Jira that do not have a test linked to it. My JQL search query looks like this:
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) AND issueLinkType != Testers ORDER BY created DESC
This query consistently comes up with nothing, although I know that I have some issues within my search that don't have an "Testers" linked to them, and others that do have "Testers" linked to them.
Performing the reverse search works as expected:
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) AND issueLinkType = Testers ORDER BY created DESC
This comes up with a subset of issues that do have tests linked to it.
And if remove the issueLinkType completely:
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) ORDER BY created DESC
I see all the expect issues in my list, with and without "Testers" linked to them. Thus, I am expecting with the initial query to find only issues that have not tests linked to them. Am I doing anything wrong, or did I run into a bug?
Building on what @Kian Stack Mumo Systems said, when you add the issueLinkType criteria using either != or = or in, the query will look only at the issues that have at least one linked issue. For an issue that has no links, the query has nothing to compare to for checking if issueLinkType is or is not "Tester". You have to use the "is EMPTY" option if you want your results to also include issues that have no issue links.
Thanks for explaining the reasoning behind it. I had thought that something like this might be the case, but this wasn't really clear from the documentation. In addition, I apparently didn't use the "EMPTY" value correctly before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the following:
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) AND (issueLinkType != Testers or issueLinkType is EMPTY) ORDER BY created DESC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for the very quick help. This seems to work. I had played with the "EMPTY" value a bit, but couldn't get it to work in an expected way either. But your lines of code seems to do the trick. I am having a few issues unaccounted for, as the total amount of issues without checking for links:
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) ORDER BY created DESC
isn't equal to the sum of issues without test links and the issues with test links:
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) AND (issueLinkType != Testers or issueLinkType is EMPTY) ORDER BY created DESC
plus
project in (xxx) AND issuetype in (Epic, Feature, Story) AND status = Done AND fixVersion in (xxx) AND issueLinkType = Testers ORDER BY created DESC
I will try to figure that one out this morning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like there are fewer entries in the query that lists issues without testers or empty (2nd query in the last post) than there should be. Apparently, the filter doesn't show any issues that doesn't have an Epic Link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Christian Wietholt,
I'm seeing issues returned that both have and do not have an Epic Link. I'm afraid I'm not quite sure what behavior you are seeing!
Thanks,
Kian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Christian Wietholt @Kian Stack Mumo Systems
Perhaps Christian is experiencing the problem documented here:
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.
@Trudy Claspill That is a good find indeed and explains exactly what I did. It even shows a workaround that I was trying to do but didn't know how to in my rookie JQL state. :-) Nice to know that I can use previous created filters in my new query.
Thank you so much for all you help. Much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian
Thank you for your question.
I can confirm that in JIRA Cloud you can only use the issueFunction() JQL function provided by ScriptRunner on the Enhanced Search page as described in the documentation here and this is the reason why you were getting the issueFunction not found error when you try to run the search in the standard JQL search inside of Jira Cloud.
This is due to the way that Atlassian restrict how the JQL functions can interact with their infrastructure meaning we must run them in a sandbox process.
This means that to run the search you should navigate to the enhanced search page located at the URL of <JiraBaseURL>/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/jql-search-view and to run the search on this page.
However this does not mean that they cannot be used inside other filters or on filters for Agile boards, and to use the functions in other filters then you will need to follow the steps outlined below.
filter = "<NameOfFilterHere>"
I would also advise reading through the page located here inside of the ScriptRunner for Jira Cloud documentation site, as this page explains in more details the differences between the Server and Cloud versions of ScriptRunner and will show what functionality that the server version contains which is different or does not exist inside of the cloud version.
The issueLinkType JQL keyword as described here and before using this in your search you will need to make sure you have synchronised keywords in your instance by following the steps outlined here.
I hope this information helps.
Thank You
Kate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, this seems to be completely not answering my question. I do not get the "issueFunction not found" error message, and I have no idea what question the answer even attempts to answer. Are you just trying to sell me here a Jira extension that I don't need?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Can I please ask when using the IssueLinkType keyword are you using the one provided by ScriptRunner for Jira Cloud as Kate was referring to the keyword that ScriptRunner for Jira Cloud provides and explaining how this works.
If you are not using ScriptRunner for Jira Cloud then can you please advise what add on you are using as the IssueLinkType function does not exist in Jira Cloud unless you have an add on installed?
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kristian,
I am not using any add on. I found the issueLinkType keyword here and I can't find any mentioning of scriptrunner on this page. That's the reason I was confused about Kate's messages and thought I am getting an unsolicited sales pitch. I am sorry if that was not the case.
Best Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Thank you for your response.
I apologise for the confusion here as ScriptRunner for Jira Cloud has a keyword with the same name and I believe Kate thought you were using the one provided by ScriptRunner which is why she tried to assist by explaining how this works.
I apologise for any inconvenience this has caused to yourself.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries, and no inconvenience at all. I totally understand now how this is connected, which wasn't apparent to me before. Thanks for explaining it.
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.