How to find a date in a issue created from an email then convert it to due date format?

Drew Bradford June 4, 2024

I have a system that creates tickets from Email. I'm setting up automation that will read the description, which is the email, and set fields accordingly. The biggest issue I'm having is with the Due Date field. The Email is sending out a date of dd/mm/yy but to set the due date it needs to be in format yyyy-MM-dd.

I am able to find the date I want using this in the Then: Edit issue  fields component:

{{issue.description.match("Due Date:\s(.*)")}}

But it always errors out because the date is not the right format.

The email is being generated from a system that I cannot modify the date format.

Is there a way to use automation to find the correct date in the description and then convert it to the format Jira is expecting?

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2024

@Drew Bradford have you tried using the smart value (.jiraDate) to convert it to a Jira formatted date?  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/ 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events