Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Filter components with JQL

Hi there,

I want to query based on components matching with some string?

For example "component !~ 'string abc'" doesn't work for component.
And I want to use wildcards like "component !~ 'string *'"

Wich operators schould I use for "component DOES NOT CONTAIN 'string *'"? Are there other operators?

I'm using JIRA 6.0.3

2 answers

The only operators you can use for component are =, !=, in , not in ,is and is not. So no chance out of the box.

Maybe you could use script runner plugin which has an additional JQL function

component in componentMatch("string.*")

i want to search for issues that have ONLY a certain component.

  1. no component -> issue is not in filter
  2. component is MBA and DV -> issue is not in filter
  3. component is MBA -> issue is in filter

is there a possibility to do that with a regex expression?

Like Samantha Birkinshaw likes this

Long after the fact, this looks like it has the intended effect:

component in (MBA) AND component not in (DV)

I tried several solutions for this myself before I came to one that worked for me.

(component is EMPTY OR component not in ("componentName"))

I wanted to show any component, even if the component is empty. Because of the architecture, the component field does not exist until a component is added to the issue. Therefore, component != or something like this will not work, because the component field does not exist and cannot be parsed, so it will return an empty issue list.

Also, just slamming an OR into your existing JQL will break the rest of your filter, so you have to wrap the whole thing in parenthesis.

Hope this helps someone.

Hi,

Try if

https://marketplace.atlassian.com/plugins/pt.lt.lfcribeiro.jira.jqlLTFunctions

Solves your problem, nevertheless it will let you run SQL functions using executeQuery()

Regards,

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