1

We are working with green hopper and have Stories. When a Bug is opened it is linked to a story through the 'Story Label' field.

Now I would like to create a query that will show me all bugs related to a sprint, meaning all bugs that relate to the Stories assigned to the sprint.

Here is the query to get all stories:

project = TMP AND issuetype = Story AND fixVersion = 11113

And Here is the query to get all bugs of a story:

project = TMP AND issuetype = Bug AND "Story Label" = jim-887

How do I combine both?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341

2 Answers2

1

You may want to look at the third-party JQL Tricks plugin. It has a function, hasLinks(), that you could use. For example:

project = TMP and issuetype = story and fixVersion = 11113 and linkedIssuesInVersion(11113,"bug related to story")

More on the usage of that in this blog post.

Thanks,

Nicholas Muldoon

@GreenHopperTeam

0

Try the following (extraneous spacing added for clarity):

project = 'TMP' and( 
      (issuetype = Story and fixVersion = 11113) or 
      (issuetype = Bug and "Story Label" = jim-887)
    )
Woodchuck
  • 3,869
  • 2
  • 39
  • 70