How can I query just the issues that have Story Bugs under them?

Basically, I am calculating the "First Time Right" metric and want to compare the number of issues completed with/without Story Bugs associated with them. 

*****

"Story Bugs" are unique Sub Tasks that we create when a defect is discovered during development, these are created under the following issue types (User Story, Technical Debt, Work, and Bugs) 

5 answers

In your project, how does a JIRA issue qualify as having a "Bugs" on it? Does it have a "sub" task of a bug? Does it have a linked issue of a "bug"? The latter can be queried in JQL.

https://confluence.atlassian.com/display/JIRA/Advanced+Searching

The native linkedissues() function requires specifying an issue key. You need SR's linkedIssuesOf() function to be able to get all linked issues of all stories.

oh yeah. I've been using that for several JIRA instances I have I forgot that it's by JIRA SR, not native.

I'll assume your Bugs issues are linked to you Stories with Issue Links. You would need some advanced JQL functions available from the ScriptRunner plugin.

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_linkedissuesof

The query would look like this:

type = Story AND issueFunction in linkedIssuesOf("type = Bug")

You can also specify a link type, Blocks/Blocked by for instance

It's not a free plugin, but it's well worth the investment. 

 

By "Story Bugs", do you mean defects that are linked to a user story? This is where the Craftware Search Linked Issues for JIRA comes in handy. Let's assume that you have a set of user stories with a common element, say, fixVersion = 3.3. Your search would be: 

issuetype = Defect AND issue in linkedIssuesFromQuery("fixVersion = 3.3 AND issuetype = 'User Story'")

I am having the same problem. Let me explain:

We create sub-tasks for bug reporting in each user story. For example, if there is one user story which has 5 bugs then we create 5 sub-tasks in the user story to report bugs.

How can I write JQL for above and is there any available widget that can show "Bugs count per story in a Current sprint"

I have the same question as Muhammad... 

Need a JQL query and any available widget for "Linked defects to a story in a current sprint"

I have the same question as Muhammad.

Need a JQL query and any available widget for "Linked defects to a story in a current sprint"

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

2,933 views 8 7
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you