You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I love the Jira Automation plugin, but it seems I am unable to use the smart values for the month description on the Summary field?
We have recurring tasks and I want to insert the name of the current month into the Summary, but whatever I tried with smart values, it was not satisfactory.
I've tried:
{code}
{{monthOfYear}}
{{now.monthOfYear}}
{{now.startOfMonth}}
{{now}}
{/code}
The best I've got are only numbers, like 1 for January, or the whole date-string for now, but I would need a descriptive name, like January, not just the number 1. I suppose it is possible to do this only with custom smart values? How would you do this?
Hi,
You can use the .format(<date pattern>) smart function to achieve this.
This function uses the underlying Java data/time formatting patterns (available here).
For your specific scenario, you can use the following smart value:
{{now.format("MMMM")}}
Thank you Gareth, this format works perfectly.
And thank you for the Java formatting patterns!
Have a great day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello.
I had a very similar issue in the past. I had a workaround using a postfunction which was able to modify the summery.
Best: Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found out that there are other possibilities of formatting the date, but just two to write the whole name of the month with other date data, but none just for the month..
now.format("MM/yyyy")
01/2021
now.longDate
January 11, 2021
now.mediumDate
Jan 11, 2021
now.fullDateTime
Monday, January 11, 2021 2:42:33 PM GMT
From: https://confluence.atlassian.com/automation/date-and-time-functions-993924864.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use this it should works fine (it will return "January" in this case) :
{{now.format("LLLL")}}
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Mohamed, I've tried the "LLLL" but it only prints "1", but Gareth pointed out I can use the "MMMM" option and it works perfectly.
Thank you also for the java hint for date formatting.
Have a great day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.