8

I'd like to query all issues in JIRA that are associated with more than 1 component. Is that feasible in JQL, and how?

Antoine
  • 5,055
  • 11
  • 54
  • 82

4 Answers4

2
component in ("component 1", "component 2", "component 3") ORDER BY  updated DESC

Above solution helped me :)

Arokia Lijas
  • 441
  • 4
  • 14
1

I didn't find a solution that was feasible in JQL. I also don't believe I have the ability to write JQL functions so I didn't get to explore that route.

I needed to be able to get a list of my tickets with multiple components. I did this by exporting my tickets to excel and then added a column which checked the cell in the same row in the Components column:

=IF(ISNUMBER(SEARCH(",", P5)), "Multi Components", "Single Component")

This checks the cell for the partial text ",". If it has the comma, Multi Components is returned.

RomanHotsiy
  • 4,978
  • 1
  • 25
  • 36
hawk8
  • 11
  • 1
  • Dumping the query out to Jira was the easiest for me. Not ideal, but a simple column filter where there's a semicolon summarised the issues for me. – Jake Edwards Sep 22 '20 at 02:51
-1

You can use

component in ("Component A") and component in ("Component B")
rlandster
  • 7,294
  • 14
  • 58
  • 96
Tony Sun
  • 19
  • 2
-1

Something like this should work:

components in (mycomponent1, "my component 2")

More help available at the Syntax Help icon on the advanced searching page

mdoar
  • 6,758
  • 1
  • 21
  • 20
  • 2
    Nope, that will return all issues which have a component from the list. What I want is issues that have more than one component specified. – Antoine Aug 31 '11 at 07:14
  • That's a good one. Something which works for me is following jql project = xxx and component="Data Provider Component and component = "Grid Configuration" which results in a list of issues which have both components I'm not sure this is an answer, because if you have a long list of components and you need to specify all permutations, you will get a huge jql – Francis Martens Sep 01 '11 at 19:05
  • That's a good idea, but I have dozens of projects and hundreds of components, so that's not really feasible. – Antoine Sep 02 '11 at 15:03
  • 1
    I guess you'll have to write a JQL function such that you can specify issuekey in componentcount(2) to get all issues which have 2 components or the one that you illustrated. We did it before, its not that difficult to do. – Francis Martens Sep 04 '11 at 15:09