Hello,
We have a custom field of type Date/Time called "Planned Start Date." I'm trying to write a JQL statement that will include all issues that meet the criteria of having a "Planned Start Date" that will occur within the next 2 hours. When I start from a Basic search, select the custom field and select "Within the last 2 hours," the Advanced JQL looks like this: "Planned Start Date" >= -2h
However, the JQL is also including issues that have a Planned Start Date beyond the next two hours as well as including issues where the Planned Start Date has already passed. Is there a more precise way to write the JQL?
Thanks in advance for your assistance.
Hello @Durell Demartini
This statement:
"Planned Start Date" >= -2h
...is interpreted as "give me any issue where the Planned Start Date is later than 2 hours before now.
If "now" is 2024-01-04 16:00 then issues will be included if their Planned Start Date is in the future with regard to that date time. That means they have a Planned Start Date of any time after 14:00 2024-01-04, including items that have a Planned Start Date later than now (i.e. 18:00 2024-01-04, or any time on any future date after today).
If you want the items that have a Planned Start Date within only the past 2 hours then you need this
"Planned Start Date" >= -2h and "Planned Start Date <= now()
Hi @Trudy Claspill thank you for the input. I tried your exact suggestion, and for some reason it didn't quite work as expected. However, I modified it a bit and it works exactly as we expect when I use this: "Planned Start Date" >= now() AND "Planned Start Date" <= 2h
Thanks very much :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your modification would give you all issues due within the next two hours.
The option you posted about in your message was finding the issues "Within the last 2 hours", which means the two hours before now. My solution matches that scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.