Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 John Funk likes this

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

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

Hi @janez_molicnik_oryx 

 

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!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

193 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you