Forums

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

Query - ONLY show results

Nick
Contributor
December 20, 2021

Hi,

Can anyone help me with adjust this query so that it INCLUDES ONLY those results where COMPONENT =XYZ.

 

In other words, if an item has COMPONENT = XYZ + ABC, it should NOT be shown?

 

This is my full query so far: "project = CC AND component = XYZ ORDER BY Rank"

 

Thanks in advance,

Z

2 answers

0 votes
Nick
Contributor
December 21, 2021

Is anyone able to help!? Seems like a relatively straightforward question...

 

I just wanted items where ' COMPONENT = XYZ ' only

 

So if an item had NO components, or any components OTHER THAN XYZ (or as well as), they would not be returned. ONLY results that have COMPONENT = XYZ exclusively should be returned in the query...

0 votes
Pramodh M
Community Champion
December 20, 2021

Hi @Nick 

Component in (XYZ) AND Component not in (ABC)

See if this works and let me know

Thanks,

Pramodh

Nick
Contributor
December 20, 2021

Thanks, but I don't want it to be this or that, I want to include ONLY items where component = XYZ.

 

Items with ANY other components should be excluded...

 

Does it make sense?

Nic Brough -Adaptavist-
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 21, 2021

Add all the other components in the the "not" in Pramodh's query.  Component not in (ABC, DEF, GHI, etc)

Like Pramodh M likes this
Nick
Contributor
December 22, 2021

Erm, that is one helluva query given we have over 100 components.....!!!!!!

Pramodh M
Community Champion
December 22, 2021

Yes, if you need to get the data, you need to add the Components in the query!!

Nic Brough -Adaptavist-
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 22, 2021

Yes, but there's no other way to do it directly.

Indirectly, if you could automate or script something that counts the components set on an issue and stores it (on potentially any change of the components list with create/edit/transition), your query could be "components = XYZ and component-count = 1"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events