The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Brant Schroeder
Community Champion
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/ 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events