Forums

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

Dynamic Date in JQL

Dietrich
Contributor
July 15, 2024

Hi all,

We have to do some reporting out of Jira on the 26th of each month and make use of the below JQL:

category = ITSM AND issuetype in standardIssueTypes() AND created >= 2024-06-26 AND created <= 2024-07-26

Each month, we need to manually change the month values by +1. So next month the query will look like this:

 

category = ITSM AND issuetype in standardIssueTypes() AND created >= 2024-07-26 AND created <= 2024-08-26

Is there a better way to do this, so the month value automatically updates itself?

Thank you

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
July 15, 2024

Hi @Dietrich 

Creating a specific, dynamic date for filtering is not possible with the built-in features of JQL.  It could check using month adjustments to "now" or functions like startOfMonth(-1), etc.: https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#startOfMonth--

Some of the workarounds you could try depend upon how you are doing the reporting.  Let's assume you need to update a saved filter, such as for use in a dashboard, filter subscription, or to just run it manually.  In that case, you could...

  • investigate the Atlassian Marketplace for possible addons to JQL to add such features
  • investigate the Atlassian Marketplace for more advanced reporting apps
  • create a Jira Automation rule which runs on a monthly scheduled and uses the REST API to update the saved filter

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events