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

Is it possible to use smart values in Summary field when creating issues with Jira Automation?

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?

 

 

 

4 answers

1 accepted

1 vote
Answer accepted
Gareth Cantrell
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.
Jan 11, 2021

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!

Like # people like this
0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 11, 2021 • edited

Hi @janez_m 

 

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 

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!

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

Hello.

I had a very similar issue in the past. I had a workaround using a postfunction which was able to modify the summery. 

  1. Create the issue with Automation
  2. Add a postfunction in the workflow at the 'Create' transaction to modify the summary to your needs.
    1. Don't forget to filter out the tickets not created by the automation!
  3. Enjoy.

Best: Peter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events