Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to JQL search the first day of the *previous* month?

morrist1 January 29, 2019

I'm trying to get a count of items that were in a particular state on the first day of the trailing n months.

So, for example, items in state XYZ on...
12/1 to < 12/2
11/1 to < 11/2
etc.

I'm using DURING which works fine for the current month...
DURING (startOfMonth(), startOfMonth("+1d"))

For previous months, my thought was doing something like...
DURING (startOfMonth("-01M"), startOfMonth("-01M +1d"))

However, I don't seem to be able to "decrement a month and add a day". Could be my usage but it seems to only like to do a single direction (i.e. either decrement or increment).

Any thoughts on how one might do this without actually hard coding the dates (i.e. I realize you can just 2018-01-01 to 2018-01-02, etc.)

Thanks in advance.

1 answer

1 accepted

1 vote
Answer accepted
Deleted user January 30, 2019

Hi @morrist1,

 

You can use the date in order to get the results like when it is resolved when it is in a particular state.

Try the below jql.

project = NEW AND  status was Done ON '2019/01/30'

community5.PNG 

Regards,

Sravya

morrist1 January 30, 2019

Thanks Sravya. Do you know if that would work with "startOfMonth" (i.e. "ON startOfMonth()").

I'm trying to make this such that I can show the trailing 6 months without having to always go in and update the queries.

My hope was I could use:
ON startOfMonth("-1M")
ON startOfMonth("-2M")
etc. 

Then the filters would never need updating.

Like Aldrin Baroi likes this
morrist1 January 31, 2019

Just got back in the office and was able to test this. It appears to work perfectly. Many thanks again!

Suggest an answer

Log in or Sign up to answer