Forums

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

How to Extract Date from a Comment & Apply to a Custom Field?

David Di Benedetto March 3, 2023

Hello all. 

 

I am trying to extract a date (US format) using Jira automation from a string inside of a comment. 

A couple of examples of comments I need to be able to parse out the date from are below.

 

1.) WO Reassignment - WO #WO01708082 has been reassigned to xyz with a due date of 3/4/2023.

2.)  Pending WO Auto-Dispatched (Parts) - All pre-ordered parts for this work order have been delivered by the carrier, and the work order is being dispatched. New ETA: 3/4/2023 8:00:00 PM

I have gotten this far in my automation below, but I am stuck on how to pull the variable out of the string to use later in the automation.

 

Any ideas? Any help is greatly appreciated.

 

Screenshot from 2023-03-03 10-25-24.png

2 answers

0 votes
David Di Benedetto March 7, 2023

Probably worth mentioning that my "Tech ETA" field is not an open string. It is "Date/Time Picker"

0 votes
David Di Benedetto March 7, 2023

It looks like these two work as per my testing, but I need to have something that can grab dates in either format (mm/dd/yyyy & m/d/yyyy)

 

(\d{1}(\/|-)\d{1}(\/|-)\d{2,4}) - pulls dates with 1 in m/d (ex. 3/4/2023)
(\d{2}(\/|-)\d{2}(\/|-)\d{2,4}) - pulls dates with 2 numbers in m/d (ex. 03/04/2023)

Suggest an answer

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

Atlassian Community Events