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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Posted in Jira Core

How to manage many similar workflows?

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 ...

4,408 views 12 6
Join discussion

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