How to use StartofYear(), EndofYear() in JIRA JQL?

Jeff Boon November 30, 2021

Hi community, I am trying to churn a report using JQL filter that displayed monthly ticket assigned to particular person in a year.

I am really confused regarding the usage of StartofYear() and EndofYear()

Since we only started using JIRA in November, below query should return data for the month of November (11M) but I am not sure why, the query below is not returning any data...

after startofyear("+11M") before endofyear("+11M")

From what I understand, the above query should return data from Starting of November to end of November right?

2 answers

1 accepted

0 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2021

Hi @Jeff Boon,

I would suggest 2 small adjustments. To start from November, just add 10 months instead of 11 and leave out the "+" as this is a reserved character. 

> startOfYear(10M) and < endOfYear(10M)

For now, you can of course just leave out the < endOfYear(10M) part, as we're not there yet.

Hope this helps!

Jeff Boon November 30, 2021

Ah yes, I think I misunderstood the meaning of 11M, I thought the 11M is meaning November but instead it is supposed to add 11 Months. Thank you for your answers.

Jeff Boon November 30, 2021

Hi @Walter Buggenhout , Any reason why the query below also returned November data?

after startofyear(9M) before endofyear(9M)

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2021

Because startofyear and endofyear do what they say - they give you the start and end of the year. not a month within a year.

I suspect you should be using "after startofmonth(9M) before endofmonth(9M)" if you only want to see data for a particular month

1 vote
KAGITHALA BABU ANVESH
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.
November 30, 2021

Hi @Jeff Boon 

 

If you want to know the tickets crated in November/current this month use this below.

created >= 2021-11-01 AND created <= 2021-11-30 order by created DESC

The above will display all the issues created from 1st November to 30th of this November.

Another way

createdDate >= startOfMonth() and createdDate <= endOfMonth()

if you are completely new to JQL please shift to BASIC while searching the issues  please follow the below

Menu -> Filters -> Advanced issues search

image.png

You can customize something like this

image.png

 

Thanks,

Kagithla Babu Anvesh

Suggest an answer

Log in or Sign up to answer