Need Help with JQL Query!!

Prasad Eda February 6, 2018

Hello There!!

We have test cases associated with subtask which have a task type - "Test"

I would like to get a JQL to get all the test cases linked to the subtask from story level.

Example: I have story eda-1122

 with the story id in hand, I would like to get the list of test cases associated with the story.

Story - Subtask - Test case

Note: Basically my question is when I run the JQL on story say eda-112

I should get the list of test cases linked to the subtask which has the task type  - TEST.

 

Regards,

Eda

 

3 answers

1 accepted

0 votes
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2018

Good morning, 

Assuming your "Test case" is an issuetype, you could run a JQL based on this: 

We're going to be looking for issues of a certain type (Test Case) that are linked to a sub-task and we'll tell the function what parent those sub-tasks should be off. 

(!) You'll need scriptrunner for this solution. 

The query would look like this: 

issuetype = "Test Case" AND issuefunction in linkedIssuesOf("issuetype = sub-task AND parent = eda-112")

To my knowledge, you can't figure this out without Scriptrunner, but I'm interested to hear other ideas! 

 

Cheers! 

Prasad Eda February 7, 2018

@Tessa Tuteleers

Am using Script Runner Plugin.

Issue type is the TEST and I would like to get a JQL to get all the test cases linked to the subtask from story level.

I should get the list of test cases linked to the subtask which has the task type  - TEST.

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2018

Hi @Prasad Eda

 

If you use scriptrunner and the issuetype is Test, you can alter the JQL to: 

issuetype = Test AND issuefunction in linkedIssuesOf("issuetype = sub-task AND parent = eda-112")

With eda-112 as issue key from the story, this needs to be altered for every filter you wish to know the tests of. 

Let me know if it isn't clear! 

Prasad Eda February 7, 2018

Thank you @Tessa Tuteleers

 

In case if I want to check the tests of the project level then I should alter the jql to:

issuetype = Test AND issuefunction in linkedIssuesOf("issuetype = sub-task AND project = eda")

Please correct me if am wrong.......

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2018

Hi, 

That is completely correct.
Good luck querying! 

Cheers, 
Tessa

0 votes
Prasad Eda February 7, 2018

Am using script runner plugin.

0 votes
Lime Trees February 7, 2018

Hi,

you can have a look at our add-on Epic Finder - you can check here for more details.

Please take a look at efIssuesStories function - in your situation you could use query similar to this:

issue in efIssuesStories("key = eda-112") and issuetype = Test

or

issue in efIssuesStories("key = eda-112") and issuetype != Subtask

Regards,

Lime Trees Support Team

Suggest an answer

Log in or Sign up to answer