Problem:
I need a JQL query for a filter in structure, which shows the issues where the field "Finish Date" is in or between the current year and these issues shall be seen also in January of next year, so until "2023-01-31";
so i tried the following, but it gives me an error; i cannot compare now() with startOfYear("+1M") and i also cannot compare now() with a fixed date like "2023-01-31"
"Finish date" >= startOfYear() AND "Finish date" <= endOfYear() OR
"Finish date" >= startOfYear("-1") AND "Finish date" <= endOfYear("-1") AND now() <= startOfYear("+1M")
anyone a solution for this?
Kind Regards,
Alex
This is more straightforward than it looks, and yet not intuitive.
You can use dates in yyyy-mm-dd format with some date fields, but not with the calculated date fields like "startOfYear"
For example
created >= 2021-01-01
Hi @Alexander
i cannot compare now() with startOfYear("+1M") and i also cannot compare now() with a fixed date like "2023-01-31"
reason is that now() is a function which replace value not a field. You cannot make JQL query like value - operator - value. You need to use field - operator - value.
In your case I think that you need to use this query:
"Finish date" >= startOfYear("-1") AND "Finish date" <= "2023/01/31"
Regards,
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your answer;
unfortunately, your query is not what i want, i just want to see the issues from the current year and only when we are in January i also want to see the issues from last year;
with your query i see, now we are in November, also the issues from last year;
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.