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

How to search if Component has more than one value in it?

We use Component as team value. SO a ticket assigned to component A belongs to Team A. Problem is sometimes people assign more than one component to a ticket and that ticket is basically not owned by anyone. 

I need to know if a ticket has more than one component value.

How do I query "component is ONLY value-x". Or component has only one value in it? 

 

thanks

6 answers

1 accepted

0 votes
Answer accepted

Hi @Nari Man

As far as I know, using Scriptrunner JQL won't give you this query either - it has more powerful component searches but would still required the "not in" addition to remove those with more than just one component.

Suggested approach is to create a custom scripted field for count of components - that way you can search for the required component in issues with a component count of only 1.

I found details on this thread about creating the scripted field - and see this Confluence page from the creator of ScriptRunner - there is a discussion on the issue in the comments section, right at the top :)

Ste

thank you. 

Like Dyonata Laitener Ramos likes this

Since we don't have an easier, direct solution - what I tried instead is to take an export (csv) with the component field being in the search result. And then use excel do the work! When we export it puts individual components in separate columns, so its a lot easier to figure out how many have only 1 or 2 or more.. pretty useful when the results of the query is of large number.

I would like to know why is not better solution to create custom jql function instead of creating custom scripted field for count of components?

I think the work will be nearly the same and you do not need new field and the function can be possible to use for any multivalue field?

But would someone give her an example for script runner?

Thank you. I have 10 components. So I guess it is not undoable. 

I wish there was an easier way. 

0 votes
Muhammad Ramzan Community Leader Sep 11, 2019

you can use following query 

 

component ="your required component"and component not in ("Add all those componenets which you want to exclude")

Jack Brickey Community Leader Sep 11, 2019

Yes that is what I conveyed above but that really isn’t scalable unless the components are few and new ones are rarely if ever added.

0 votes
Jack Brickey Community Leader Sep 10, 2019

you will need an addon for this unfortunately. unless of course you wanted to hard code the query which is unwieldy in most cases.

example...

component = A and component not in (b,c,d,e,f,...)

component = B and componente not in (a,c,d,e,f....)

...

Which Add-on?

Jack Brickey Community Leader Sep 10, 2019

i would look at scriptrunner or power scripts there may be others.

We have scriptrunner. I am looking for specific help on what query will give me the results. 

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