JQL Query - Specific Status search with caveat

Doran Sheftall May 18, 2015

I am trying to build a filter to run a subscription on. The parameters are:

  1. Within a specific project
  2. is a specific issuetype
  3. has a specific label
  4. and finally, one of a few statuses with special conditions.

The last item is giving me problems.  I would like to state is not 1 of 5 different statuses out of 11 total in the workflow, then if it is another 1 of the remaining 6 statuses, it must have been updated within the last week.

Here is my query:

project = IM AND issuetype = "Client Implementation" AND labels = VHA AND (Status not in ("Declined Training / Live", "Client Cancelled", Closed, "Implementation Cancelled", Duplicate) OR (status = Live AND updated > startOfWeek(-1)))

 

  • I have items 1, 2 and 3 covered
  • When I start 4, i state the 5 statuses it must NOT be in
  • I then state it can be this other state, but NOT unless it was updated in the last week

All statuses in workflow are:

  • Open
  • Assigned
  • Welcome Package Sent
  • In Training
  • Training Complete/Not Live
  • Declined Training / Live
  • Duplicate
  • Client Cancelled
  • Implementation Cancelled
  • Closed
  • Live

So, the goal is to display all tickets with project IM, issue type Client Implementation, label VHA with statuses Open, Assigned, Welcome Package Sent, In Training, Training Complete/Not Live or Live (but was updated within the last week).

I've tried the following to the query above:

  • As is
    • I receive 3 tickets with remaining statuses that are not Live
    • But I receive ALL of my live.  Some of which was last updated months ago
  • Change the "OR" to "AND"
    • I do not receive the 3 tickets with remaining statuses that are not Live
    • But I receive 4 valid Live tickets
  • Change the operator > to < for the update statement
    • No effect
  • Remove encasing parens for the status check
    • I receive a ton of tickets not in scope.

 

Any help you can provide would be greatly appreciated.

 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Jaime S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2015

Hi, Doran.

I'm not absolutely sure I understood the query, but I'll help you the way I understood. I'll ignore the first 3 parameters, as you got them cover.

First of all, the 'OR' there is a problem, as by your description, the issues must not be in any of the six statuses.

After that, it seems that if it's in a specific status of the remaining ones, it should have the 'updated' field as you defined.

I'd create something like this:

&lt;other conditions for 1 to 3&gt; AND (Status not in ("Declined Training / Live", "Client Cancelled", Closed, "Implementation Cancelled", Duplicate)) AND ((status != Live) OR (status = Live AND updated &gt; startOfWeek(-1))

This way, it won't be in any of the status you wanted to removed and if it is in the Live status, it will have to be updated after the start of the week.

I hope it was helpful.

Kind regards,
Jaime Kirch da Silveira
Atlassian Cloud Support

Doran Sheftall May 18, 2015

Good evening Jaime, that looks to have done the trick. Thank you very much!

Jaime S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2015

No problem, Doran. I'm glad to hear that.

Suggest an answer

Log in or Sign up to answer