Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,339
Community Members
 
Community Events
176
Community Groups

JQL - get current month automatically

Hi, 

I'm building automation that will create each month a new issue. 

I would like for the issue's summary to contain the name of the current month we are in. 

How can I do it using JQL? 

Thanks

3 answers

2 accepted

1 vote
Answer accepted

JQL finds issues, not dates, so, no, you can't do this with JQL.  You'll need to write something that can get the month name as part of your "create" script/program

Thanks - where should I write something like this?

0 votes
Answer accepted

Hi @Dana_Harel 

I am guessing your rule uses the scheduled trigger to create the new, monthly issue.

If so, please take a look at the date time functions for smart values, and the documentation on the format() function: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

With that, you may format the value of {{now}} to be the name of the current month.

Kind regards,
Bill

Hi @Bill Sheboy thanks!

I am using the scheduled trigger to create new monthly issue.

My wish is that for each issue - the summary will contain the current month's name -
For example "Monthly task - December"

I tried using the documentation attached but it seems like all I can get is the full date.

I tried using:

  • {{issue.created.format("dd/MM/yyyy")}}
  • {{now.startOfMonth}}

Will you be able to advise?

Thanks

That link I provided shows the format() function, and a link out to the examples for the format strings.  Here is one to return the full month name for the current date:

{{now.format("MMMM")}}

Thanks is worked!!

Like Bill Sheboy likes this

Can I use "getMonth()" or one of - endOfWeek, endOfMonth, and endOfYear; and startOfDay, startOfWeek, startOfMonth, and startOfYear?

Suggest an answer

Log in or Sign up to answer