It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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.

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.

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
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,082 views 7 0
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you