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

Why is syntax for 'updated' JQL item "> -X" instead of "< X"?

I think this works for both "updated" and "updateddate".

To determine issues "updated in the last X" you must use "> -X" ("greater than negative X ago").  Why?

Trying to use "< X" ("less than X ago") seems to utterly fail.  I tried "<100d" for 100 days and was getting issues updated many years ago.

My question is not how does the syntax work, as I get it now, but why does it work this way?  Why doesn't `less than` actually work?

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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.
Jun 18, 2018

Hello,

The point is that if you have a jql like 

updated < Xd 

It will give you all issues, which were updated BEFORE the currentDate + Xdays. Actually that will be all issues in your Jira instance, which were ever updated.

On the other hand if you type

updated > -Xd

means to find all issues which were update AFTER currentDate -X days and that is why it gives you only issues, which were updated from currentDate -X till now.

Is this just an inherent quirk of how JQL operates? 

It just doesn't seem very intuitive, like instead of 2 + 2 = 4, you have to say 2 - (-2) = -(-4), same things but one's clear and the other much less so.

Alexey Matveev
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.
Jun 18, 2018

I am used to it. To be honest I do not even remeber if I had problems with it or not :) but the point is that you compare dates, not intervals. The updated field is a date. That is why you can wirte only date1 < date2. You can not write date1 < interval. You can not compare intervals and dates. The same in Jira. Xd is an interval, that is why Jira converts it to a date: current date + Xd. That is why you can replace Xd with currentDate + Xd in your mind. And it will be logical.

Ah, knowing that it does make much more sense then.  Still not quite intuitive if you don't already know how to type it out, but oh well.  My initial issues with is is because I am usually using the Advanced search/syntax method where I type everything out, as opposed to the Basic syntax where you're selecting from dropdowns etc.  At first it had completely skipped my mind to simply use the Basic syntax to create a search, then select Advanced to see how to type it out.

Alexey Matveev
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.
Jun 18, 2018

If you feel like your question was answered, Kindly accept this answer. In this case other people with a similar question will be able to find this answer.

@Alexey Matveev  

 

updated > -Xd  (updated > -8d)

means to find all issues which were update AFTER currentDate -X days and that is why it gives you only issues, which were updated from currentDate -X till now. Today 9th Nov then it will show all tickets which were updated on or before 1st Nov. Correct?

updated < -8d What is the meaning of this?

Suggest an answer

Log in or Sign up to answer