Dear all,
I try to build to build a filter which is suppose to return all issue from current year 2021.
For doing so, I add to the end of my Jql script the following created >= -365d
But this return records which has been also created in 2020, what I am doing wrong ?
Thanks for help
regards
Your JQL is looking for "date larger than or equal to 365 days ago", it's not looking at calendar years.
You should look to the calendar functions, start of/end of, day, week, month and year.
For this one, I think I'd use
created > startOfYear()
(If you wanted to include last year, you'd use "created > startOfYear(-1)" )
createdDate >= startOfYear()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @serge calderara
If you want to retrieve all issue of the current year you can use this :
created >= startOfYear()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello @Mohamed Benziane , thanks that works.
by the way if I need to retrive issue from previous month what will be the syntax ?
Let say that if current month is february, I would like the filter of only month january.
is tehre any prevMonthofYear() ?
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the startOfMonth() function.
This one should work for you :
startofmonth(-1)
In your scenario if you want to go back until December you will replace "-1" by "-2" and so on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
perfect thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.