Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,699
Community Members
 
Community Events
184
Community Groups

How Do I Create a JQL Filter Comparing Against An Issue's Due Date?

Dalectric
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.
Feb 28, 2018

I have a filter that compares against a specifc date at the moment.

status was not in (Open, In Progress, "Awaiting Approval") on "2018/02/27"

I would like to use the due date of a specific issue (i.e KEY-1234) so that if the due date of the issue changes the filter will use this updated date.

Is this possible?

I have ScriptRunner and JQL Tricks plugins to use as well.

1 answer

2 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 02, 2018

I cannot find a way to do this with Jira, Scriptrunner, and/or JQL Tricks.  I will try to explain why I think that is first. When you're using a WAS clause, this is looking into historical data on issues in Jira.  This behaves a little bit differently than standard issues and their current values.

In native Jira, when you use the WAS parameter, you can then use the other time parameters such as ON, BEFORE, or AFTER.  But the problem here is that these have to be a specific date/time.  They cannot be a variable such as DueDate, Updateddate, etc.

The addition of these two other plugins can't change this fact.  Scriptrunner, does have a dateCompare function.  But in order to use this, you have to do so within the issueFunction structure. This does not afford its use within a WAS statement of JQL.  And we would still need some other date variable to compare it against.

What I think you are looking for here is really something that I think could be accomplished with a SQL query.  Which is why I am more inclined to suggest the use of the SQL for Jira Driver plugin,  I believe this plugin would then allow you to use more of a SQL syntax formatting in order to create a hybrid JQL/SQL query that might permit you to find these issues based on those values.  I am not positive this will work, but I think this is currently the best avenue for success here.

Dalectric
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.
Mar 05, 2018

Hi, many thanks for your investigation and great explanation. It makes a lot of sense and I'll have a look at the SQL plugin route.

Thanks again

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events