testingjirajql

How to check Jira test case related to one issuetype epic?


I am using jira for my test management and we are writing many test cases in epic level e2e flow. When we upload test cases to jira in bulk we are tagging each test case with related issues of epic number, so we can use below script with each epic no to filter test case

issue in linkedissues("epic-no") and issuetype = Test

however my problem is, many people are missing to tag this epic no with test case while upload to jira and it create incorrect data dashboard. Can any one give me a filter which I can check this, if any test case do NOT have the epic link in "related to" fucntion in my test plan level. It saves my time a lot.


Solution

  • So, JIRA's JQL can't really look for issues missing a specific link type by itself. But, you can work around this in a few ways.

    If you've got a plugin like ScriptRunner or JQL Tricks Plugin, you can make some fancier queries. For example, with ScriptRunner, you could use:

    issueFunction not in hasLinkType("Your Link Type")
    AND issuetype = Test
    

    Just swap out "Your Link Type" with whatever link type you use for your epics, like "Relates to" or "Blocks". This will help you find all test issues that aren't linked up with a specific type of issue link.

    Now, if you don't have one of these plugins, it's a bit more hands-on. You'll have to manually compare two lists: one with all your test cases, and another with test cases linked to epics. Pretty sure that's not really what you were expecting... Damn Jira.