Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL Filter Issue

I currently have this JQL for a board

Team = 5314 AND issuetype not in subTaskIssueTypes() AND issuetype != Risk AND (Status != complete OR status changed to Complete after startOfDay(-25) ) ORDER BY Rank ASC

 I am trying to also inject a new issue type that is in working status or expected delivery within 30 days

1 answer

0 votes
John Funk Community Leader Apr 14, 2021

Hi Josh,

I would start by adding one element at a time see what works and when it doesn't return the results you want, and then tweak from there. 

Thats what I have been doing and why I'm here now asking for help

John Funk Community Leader Apr 14, 2021

Very good - where is it breaking down for you? At what point/element does it not provide what you need? Do you get an error? Or it just doesn't return the right results? 

The JQL in the code returns fine just when I try to add the second issue type the board times out.

John Funk Community Leader Apr 14, 2021

So exactly which part of the code is working with no problems? 

The entire code posted is working fine

Team = 5314 AND issuetype not in subTaskIssueTypes() AND issuetype != Risk AND (Status != complete OR status changed to Complete after startOfDay(-25)) OR issuetype = CDRL AND Status != "In Progress" AND ("Expected Delivery Date" >= startOfDay(30d)) ORDER BY issuetype DESC, Rank ASC

 

So this is what I have right now but the expected delivery date is not filtering out correctly. Its just show all CDRL issue types

Hi @Josh Velez 

I believe you have an order of precedence thing happening with the OR clause.  Have you tried wrapping the two things you want in parentheses to clarify the OR condition?

Is this what you were trying to query?

Team = 5314
AND
(
(
issuetype NOT IN subTaskIssueTypes()
AND issuetype != Risk
AND (
Status != complete
OR status CHANGED TO Complete AFTER startOfDay(-25)
)
)
OR
(
issuetype = CDRL
AND Status != "In Progress"
AND "Expected Delivery Date" >= startOfDay(30d)
)
)
ORDER BY issuetype DESC, Rank ASC


Best regards,

Bill

So this didnt work. I have the two separate JQLs returning properly but when I combine them it doesnt work.

 

Team = 5314 AND (issuetype NOT IN subTaskIssueTypes() AND issuetype != Risk AND (Status != complete OR status CHANGED TO Complete AFTER startOfDay(-25)))
Team = 5314 AND (issuetype = CDRL AND Status != "In Progress" AND "Expected Delivery Date" <= startOfMonth(30d)) 

One more thing to try: completely separate the queries and then OR the result sets.

(
Team = 5314
AND issuetype NOT IN subTaskIssueTypes()
AND issuetype != Risk
AND (
Status != complete
OR status CHANGED TO Complete AFTER startOfDay(-25)
)
)
OR
(
 Team = 5314
AND issuetype = CDRL
AND Status != "In Progress"
AND "Expected Delivery Date" >= startOfDay(30d)
)
ORDER BY issuetype DESC, Rank ASC

 

Like John Funk likes this

Still not working idk what the issue is when the two JQL are separate they work fine

Thanks, Josh.  At this point I think you have two options:

  1. If you only needed this one time, run the queries separately and merge the results in a spreadsheet after exporting
  2. If you regularly need this query, talk to your site admin to submit a support request to Atlassian.  Perhaps the support team will see something the community is missing.  https://support.atlassian.com/contact/#/

Best regards,

Bill

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

248 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you