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 edited

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
TAGS
atlassian, aafp, jira migration, marketing collaboration, end siloed work, streamline workflows, kerrie gottschalk, jira cloud admins, unified marketing, process visibility, team efficiency, cross-team collaboration

How Kerrie Gottschalk unified AAFP’s marketing team with Jira

At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.

Read the story
AUG Leaders

Atlassian Community Events