Kanban | Swimlane query | Show issues from multiple "Fix Versions"?

Nick
Contributor
February 19, 2023

Following some assistance from other folk in the community, I have evolved my original query to as per the below, which I want to use to pull issues belonging to either of the fix versions IDs.

project = CC AND issuetype in (Story, Task) AND (labels != TechImprovement OR labels is EMPTY) AND fixVersion is fixVersion in (78760, 74907)

Unfortunately, it isn't quite working and Jira is returning the following error: "Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'in'. (line 1, character 125)"

Thanks in advance!

 

PS. I was forced to create a new thread as the board wasn't accepting my replies in my other thread

2 answers

2 votes
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.
February 20, 2023

What are you expecting "and fixversion is fixversion in (x, y)" to do?

I think you probably want just 

and fixversion in (x, y)

Nick
Contributor
February 20, 2023

Sorry, not sure how I missed that one.

Query is now running, however, it's still placing "some" items that fall into my query bracket into an "Everything else" group. I can't work out why for the life of me..

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2023

Provide the details about the issues that are in the Everything Else group. What are their values for

project

issuetype

labels

fixVersion

Like # people like this
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.
February 20, 2023

Computers are highly logical and don't think in human languages, it is very easy for us to give them a "simple" query and them no understand what we really want!

Now you have a working query, the question becomes "why does your issue not match the query"?  Find a missing issue and work through how it works with your query.

Like # people like this
0 votes
Nick
Contributor
February 21, 2023

Hi @Trudy Claspill

I found the problem. Big time user error, as you may have predicted :)!

Thanks all!

Nick
Contributor
February 21, 2023

Sorry guys - just one issue that I'd benefit from your experienced eyes over:

project = CC AND issuetype in (Story, Task) AND (labels != TechImprovement OR labels is EMPTY) AND fixVersion in (78760, 71958, 74907)

It's only returning issue types = "Story" and seemingly ignoring "Task".

I'm guessing my query is problematic here?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2023

Do you have any Task issue types that are

- in the CC project and

- have either no value in Labels or if there are values then none of them are "TechImprovement", and

- has one of the three specified Fix Version values?

If you have one that you think matches the criteria but isn't being returned, please show us the details of that issue with the above details visible.

Nick
Contributor
February 22, 2023

Hi @Trudy Claspill - Basically no "Tasks" are being returned. Even those "Tasks" with the fields you mentioned (from my query) with the exact same values (no more, no less) than those of the "Story" counterparts.

For the issue types = "Task" that I expected to be returned:

  • in the CC project = yes
  • have either no value in Labels or if there are values then none of them are "TechImprovement" = yes (no labels set)
  • has one of the three specified Fix Version values = yes

Thanks

Nick

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2023

If you remove most of the query so that you are down to

project = CC AND issuetype in (Task)

...then are any Task type issues returned?

Are you sure "Task" is the name of the issue type in that project?

When you type "Task" into the search filter do you get more than one matching issue type named "Task"?

Screen Shot 2023-02-22 at 7.38.47 AM.png

Like Nick likes this
Nick
Contributor
February 23, 2023

 

Please ignore this comment and see my one after this :)

 

Nick
Contributor
February 23, 2023

@Trudy Claspill I tried as you advised and removed "Story" element from my query, so it now looks like:

project = CC AND issuetype in (Task) AND (labels != TechImprovement OR labels is EMPTY) AND fixVersion in (78760, 71958, 74907)

And as you predicted, no other types other than "Story" were returned.

I also tried the following query (using the = operator), but same results; only "Story" are returned:

project = CC AND issuetype = Task AND (labels != TechImprovement OR labels is EMPTY) AND fixVersion in (78760, 71958, 74907)

 

Lastly, I can confirm that "Task" is a valid and used issue type (along with "Epic", "Story", "Defect") and there are many tasks matching the criteria in the query (i.e. no labels, same fix versions and same project.)

Any ideas?

Nick
Contributor
February 23, 2023

Can anyone help?

@Trudy Claspill ?

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.
February 24, 2023

Can you show us an issue that you think should be returned by the query, but is not?

Nick
Contributor
February 24, 2023

Hi @Nic Brough -Adaptavist- - Screenshot is attached. All the fields are the same as the "Story" issue type - the only different is the fact that it is a "Task" and not a "Story". Indeed, NO "Tasks" are returned in ANY of the swimlanes for the entire board (never mind the swimlane for which the query in question corresponds to).

Maybe it's a board-wide filter?

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.
February 24, 2023

There's no screenshot of the issue here.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2023

Hello @Nick 

To debug a filter that is not producing the desired results you need to start with a subset of the criteria. Please try this query

project=CC and type = "Task"

Are any issues returned?

If not, then either "CC" is not a key that matches a project or "Task" does match any of the issue types for issues that exist in the CC project. Please provide a screen image of an issue that you think should be returned that is not being returned.

If you did get issues from the query above, then try adding the next element, either the Labels or fixVersion part of your query. If you stop getting any results, then the problem is in the part of the query you added.

By adding one additional criteria to your query at a time you can zero in on the part that is causing issues to be excluded.

Suggest an answer

Log in or Sign up to answer