Forums

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

JQL Automation for Past Due Date Not working...

ayoung
Contributor
October 27, 2023

Hi there, 

 

I am attempting to pull records that match: 

  • Due more than 30 days ago
  • Does not have the label "Post_Survey"
  • Status = Done

 

I am continuing to get 0 records returned on tests though I specifically set up the attached ticket to match all criteria.  Anyone see something I messed up here?

Screen cap included to demonstrate


JiraSurveyJQL.jpg

1 answer

1 accepted

4 votes
Answer accepted
Mikael Sandberg
Community Champion
October 27, 2023

It is because you are searching on labels. When you do that you either have to include issues that do not have a label like this:

duedate < -30d AND (labels != Post_Survey OR Labels is EMPTY) AND resolution was "done"

The other option is to negate the label like this:

duedate < -30d AND NOT (labels = Post_Survey) AND resolution was "done"

ayoung
Contributor
October 27, 2023

You are a complete rock star Mikael! Thank you so much - I never knew this field was handled different in JQL Automation scripts :) Found exactly one issue as it should. Amazing!

JQL_Fixed.jpg

Mikael Sandberg
Community Champion
October 27, 2023

It is not just in automations that you have to do this. Anytime you are doing a JQL that you want to exclude a label or component from you have to include when the label/component is empty.

Like ayoung likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events