Forums

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

JQL rquery for not displaying stories with status "cancelled" and which are released in Structure

Yashveer December 14, 2018

Hello Community,

In my structure, I have added a filter not to display Epics, which are completed, cancelled and implemented, at current level.

JQL I have used = status not in (completed, cancelled, implemented) -- it is working fine :)

Now along with above filter I want stories, only with status "cancelled" and "which are released", should also not display. I have tried extending it to level 2 but it is not giving desired result :(

Could you please help with JQL?

Thanks in advance!

Yashveer

2 answers

0 votes
Jack Brickey
Community Champion
December 14, 2018

hard to give you a precise answer on this w/o really knowing more about the specifics but here is something I would try/start with...

...OR (issuetype = Story AND status != cancelled OR fixVersion not in releasedVersions())

i'm not sure this is exactly what you want but it should be getting close

Yashveer December 18, 2018

Hello Jack,

Thanks for your response!

In my structure where all issue types are available. I want to add a filter by which I should be able to see

1. All EPICS with status != Completed, Cancelled, Implemented. at current level (Level 1)

2. All stories under EPICS with status != Cancelled and fixVersion is not released. at child level (Level 2)

3. And all respective issuetypes (sub-tasks, test cases and defects) linked to stories available. at sub-child level (Level 3)

To start with, I have tried with below JQL (suggestions provided by you and Petterson) but could not get desired result :(

(issuetype = epic AND status not in (Completed, Cancelled, Implemented)) or (issuetype = Story and status != Cancelled AND fixVersion not in (releasedVersions()))

Cheers!

Yashveer

Jack Brickey
Community Champion
December 18, 2018

So what are you or are you not seeing with the above query? I suspect the flaw in the above is that it does not honor the association between the epic and the stories. TBH, Assuming I understand your goal, I’m not sure you can accomplish OOTB and would point you to an app like Scriptrunner or Power Scripts.

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2018

Hello Yashveer,

You can create the following filter to achieve your need:

 

(issuetype = story AND status not in (Canceled, "which are released")) or (issuetype = Epic AND status not in (completed, cancelled, implemented))

The brackets added to which query should properly separate and execute it.

Let me know if the query above works for you as you expect.

Yashveer December 18, 2018

Hello Petterson,

Thanks for your response!

I have tried with below JQL but not able to achieve the desired result :(

(issuetype = epic AND status not in (Completed, Cancelled, Implemented)) or (issuetype = Story and status != Cancelled AND fixVersion not in (releasedVersions()))

Cheers!

Yashveer

Suggest an answer

Log in or Sign up to answer