Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

sub-jql for tested by = Test (overall requirement coverage)

Khan
Contributor
December 23, 2020

Hi Community,

I have the following jql for obtaining the overall requirement coverage: (think of it as obtaining overall requirement coverage via a jql :) Please see screenshot of X-ray requirement coverage)Screen Shot 2020-12-27 at 14.07.35.png

the jql works fine, with the exception that stories with linked issuetype = test execution  are also shown. However, I would like to get only those stories who were tested by issuetype=test

from query1, I'll get a list of Stories:

project = "XX" AND issuetype = Story AND status changed to closed during ("2020/11/01 00:00", "2020/12/1 00:00")  AND issueLinkType = "tested by"

Returns: Story1->tested by=Test execution, Story2->tested by=Test execution, Story3->tested by=Test

Now, how do I filter out Story1, Story2 and return only Story3 ?

UPDATE:

Can someone from Atlassian developers of the Xray Reports help in this case?

thanks in advance

3 answers

1 accepted

0 votes
Answer accepted
Khan
Contributor
February 2, 2021

Hi Community,

Finally got the answer after thinking with a cool-mind :)

project = "XX" AND issuetype = Story AND "Requirement Status" != "UNCOVERED" AND status changed to closed during ("2020/11/01 00:00", "2020/12/1 00:00")

should do the trick of showing only those requirements, that have been covered by Tests

We can close this topic.

Regards

0 votes
Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2020

Its very confusing line

 

the jql works fine, with the exception that stories with linked issuetype = test execution  are also shown. However, I would like to get only those stories who were tested by issuetype=test

 

 

Can you please elaborate more what is happening and what you wan to achieve

Khan
Contributor
December 23, 2020

Ticket_type: Story should have an Issue link > tested by: ticket_type= Test

if the tested by: ticket_type= Test Execution, then the Story is not covered by a test case properly.

Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2020

Got it, so you want to get those stories which are linked with issueType Test by using link "Tested By" and currently you are getting all stories which are linked with issue type test and test execution records by using link type tested by.

 

Your query is fine, it will get all results as you can see. Unfortunately as per my current knowledge this feature is not available by default in Jira. You can use some plugins like 

Script Runner, JQL Search Extensions.

I used the JQL Search Extensions few months ago to solve a problem for one of my client so i can give you some hints , if  it works for you

Here is the example of  JQL Search Extensions for Jira & reports

You need to use sub query function, below is a simple example, to give you concept you can change further

Query1: 

project = "XX" AND issuetype = Story AND (labels not in (not-qa-testable) OR labels is EMPTY) AND status changed to closed during ("2020/11/01 00:00", "2020/12/1 00:00")  AND issueLinkType = "tested by"

 

Then use this query1 as 

 

linksQuery="query1"

 

Reference:

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/173211649/Subqueries+-+Jira+Cloud

Khan
Contributor
December 24, 2020

I'm not using Jira cloud

Daniel Ebers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 26, 2020

The App mentioned by Muhammad is also available for Jira Server.
Disclaimer: I have not tested it nor I have looked into the JQL. In case you have a non-production test environment you could test his suggestions using the mentioned App alongside with a trial license for 30 days.

Khan
Contributor
December 27, 2020

@Daniel Eberssorry, still not clear for me. Can you please be more specific with an example?

from query1, I'll get a list of Stories:

project = "XX" AND issuetype = Story AND status changed to closed during ("2020/11/01 00:00", "2020/12/1 00:00")  AND issueLinkType = "tested by"

Returns: Story1->tested by=Test execution, Story2->tested by=Test execution, Story3->tested by=Test

Now, how do I filter out Story1, Story2 and get only Story3 ?

Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 27, 2020

@Khan , you mentioned the tags as Jira cloud that's why i gave you example of jira cloud.

 

In jira server its more easy than cloud to get the required results.

 

issue in linkedBy("tested by" , "project = "XX" AND issuetype = Story AND status changed to closed during ("2020/11/01 00:00", "2020/12/1 00:00")")

 

Reference

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/30497099/JQL+Reference+Server

Khan
Contributor
December 27, 2020

Thanks @Muhammad Ramzan(Atlassian Certified Master)  for the reference link. But, I can't locate any reasonable example of a subquery. The reference is a huge page with simple examples like: issue in fieldMatch("project = SEARCH", "description", "find issues mat*")

A concrete example would be very appreciated. Please refer to my reply above to @Daniel Ebers

Khan
Contributor
January 8, 2021

Anyone from Atlassian developers can help please?

0 votes
Jack Brickey
Community Champion
December 23, 2020

Scratching my head here. I can’t see how you would get an issue with issuetype other than “Story” here. Is the above JQL a copy and paste? Is it possibly there is an OR somewhere in your JQL?

Khan
Contributor
December 23, 2020

the JQL will give me a list of Stories.

I need the list of all stories, where tested-by is of type Test, not any other type.

Details: Overall requirement coverage requires that you like a Test case to a story only. But sometimes colleagues also link test execution tickets to Story (which is not correct).

This linkage Test case to Story is important for requirement coverage.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2020

Hi @Khan 

To help clarify a bit, would you please list the names of all of your issueTypes and the names of all of your issueLinkTypes?  Thank you!

Best regards,

Bill

Khan
Contributor
December 24, 2020

X-ray requirement coverage will be tracked only if issueType=Story has a corresponding issueType=Test. All other issueTypes are not of mine concern. (But they are also needed e.g. testplan, test execution etc)

When a requirement is tested by a Test then it is linked as issueLinkType = tested by

Now issueLinkType can be many types e.g. execution ticket, bug, task, Test etc.

I need probably a sub-jql to filter out only Test tickets linked to a Story.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events