How to get last month issues

upendra vemula
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2018

I want to have filter to get last month issues, i mean, now we are in May, I wan to get the issues which captured in Apr, Do you have function like Created = LastMonth() ? 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

10 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 1, 2018

try this....

  1. create this filter: createdDate < endOfMonth(-1) and createdDate >= startOfMonth(-1)
  2. set up subscription to run monthly on the 1st of the month and email to you
upendra vemula
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2018

Thank you for your prompt response, It worked out for me,

Jason Lane
Contributor
September 16, 2022

Hi,

Be mindful here this will not include the last day of the month so you'll need to amend the code to createdDate <= endOfMonth(-1) and createdDate >= startOfMonth(-1).

I did mine and went from 86 issues to 92 - when reviewing the rw output there was no data for the last day of the month hence the change.

Thanks

Like Jack Brickey likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2022

@Jason Lane ,

I was just testing this and using my query and it does (and should) pick up the last day. I am curious and would like to clear this in my head. Can you inspect your results and find the delta between the two queries? Thanks!

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2022

Here is what I see....

1D0D6C66-1F27-4884-AF70-F287FF22BAE9.jpeg

Like Jason Lane likes this
Jason Lane
Contributor
September 16, 2022

Sorry i thought i had added to my post - I used a different date in mine and copied the wrong information over - Mine used was LiveDate <= endOfMonth(-1) and LiveDate >= startOfMonth(-1).

Interesting though that i had to make the change to the logic to get the information.

Sorry for the confusion. Jack is right with his but you need to ensure if you use a different date field that you check both.

Thanks

1 vote
Jason Lane
Contributor
September 16, 2022

Afternoon

Be mindful here this will not include the last day of the month so you'll need to amend the code to createdDate <= endOfMonth(-1) and createdDate >= startOfMonth(-1).

I did mine and went from 86 issues to 92 - when reviewing the rw output there was no data for the last day of the month hence the change.

Thanks

Jason