I have an automation to add the jira.date to a field when a status is changed. I'd like to also have a secondary custom field where this date is reflected as "YY/MM".
Hello @Jon Parker
Welcome to the Atlassian community.
That secondary custom field will have to be a text field because it is not possible to specify different date formats for different fields.
You can use the date/time format commands to get the date in the format you want and put that into the custom field.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
A link to the Java documentation for formatting options is found in the last row in the first table in the above page. I believe you would use:
{{issue.YourDateField.format("YY/MM")}}
Hi @Jon Parker -- Welcome to the Atlassian Community!
Is that other custom field a text field?
If so, you may use the format() function with the layout needed:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-format---
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.