Forums

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

How do I write a query to give list stories with two different statuses?

Jacqueline Newton September 2, 2021

I need the query to list stories that have status of "To Do" and "Backlog"

2 answers

2 accepted

2 votes
Answer accepted
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
September 2, 2021

Hi @Jacqueline Newton welcome on the community. It should be

  • issuetype = Story and status in ("To Do", "Backlog")
Jacqueline Newton September 2, 2021

I get error message - Operator '=' does not support the list value '("To Do", "Backlog")' for field 'status'

Jack Brickey
Community Champion
September 2, 2021

You should be using “in” as Martin illustrates.

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.
September 2, 2021

I don't think you are using what Martin typed then, you've removed something.  The = in Martin's query is comparing ossuetype to story, but your error message says you've used = against a list.

Try using exactly what Martin gave.

Jacqueline Newton September 2, 2021

it's a label called To Do and the query present that works is status = "To Do" I want to add "Backlog" to this query and make it still work

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.
September 2, 2021

That is what "in" is for - try 

Status in ("To do", Backlog)

Like Jacqueline Newton likes this
Jacqueline Newton September 2, 2021

It worked!! Thank you so much!!

Like # people like this
1 vote
Answer accepted
Jack Brickey
Community Champion
September 2, 2021

Hi Jacqueline,

Welcome to the community! To be clear issues in Jira have only a single status unless of course you’ve created some sort of custom status field. However I’m sure that’s not the case here. What I expect you’re trying to find his issues that are in the to do status that happen to be in the background of some project board. Most of the time your To Do status defines your backlog but not always. Can you help me better understand your goal here so that I might be able to give you a meaningful answer?

Jacqueline Newton September 2, 2021

Yes that is correct, there is a smart filter created already that is - status = "To Do", I want to change the query to add "Backlog" also.  

Jack Brickey
Community Champion
September 2, 2021

Then you likely want what Martin has illustrated in his response.

Jack Brickey
Community Champion
September 2, 2021

My confusion was in the “and” in the sentence …have status of "To Do" and "Backlog". What you are really looking for is …have status of "To Do" or "Backlog"

Jacqueline Newton September 2, 2021

Yes you are correct, looking for the stories that have the status of "To Do" or "Backlog"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events