Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Query - ONLY show results

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

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 Leader Dec 20, 2021

Hi @Nick 

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

See if this works and let me know

Thanks,

Pramodh

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?

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

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

Pramodh M Community Leader Dec 22, 2021

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

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

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