Forums

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

JQL Query Question

Summer X
Contributor
August 29, 2012

Hi,

I'm having trouble with JQL. I want to create a JQL based on the built-in field "component", which has a list pre-defined values (e.g. HW, SW, ME). An issue's component field can have 0 to multiple values.

I want to create a query that searches for issues whose "component" field does NOT CONTAIN "SW" ALONE. For example, Issue 1's component field has "HW, SW", Issue 2's component field has "SW", and Issue 3's component field has no value. Issue 1 and issue 3 would be returned in such query.

How can I create such query using JQL? Thanks!

4 answers

0 votes
Ian Wells May 17, 2015

and  (not component in ("documentation", "research") OR component is empty)     

 

works

0 votes
Thomas Krawczyk March 11, 2014

Does this work?

project = x AND ( NOT (component IN ("SW")) OR component=Empty)

put the NOT outside the (component IN (x)) clause. Not sure why you also need the OR Empty part.

0 votes
Norman Abramovitz
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.
August 29, 2012

This will not eliminate single component names but it might help group the single component names together so you can visually skip over them.

component = SW ORDER BY component desc

0 votes
Jobin Kuruvilla [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.
August 29, 2012

Try something like this?

component in ("SW") and component not in ("HW", "ME", ...)

Include all components other than SW in the second clause.

Summer X
Contributor
August 29, 2012

Thanks Jobin that's the approach we are taking right now. But if we add/change the values available for components, we need to update the query. And we actually have quite a bit more components values than I listed here. So I was hoping for a way to avoid listing all of them in the query

Jobin Kuruvilla [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.
August 30, 2012

Can't think of anything else here :)

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events