Forums

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

Extract a date from description string and apply to Due date

Faheem Mushreef
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2025

Hiya folks, 

I am trying to extract a date from Description and apply that date to the 'Due date' field. For example the description has the format 'Date – 10/11/2025' . 

I would like to extract 10/11/2025 from above and set the 'Due date' field in the work item to populate this.

I've tried to use the following regex in the automation rule and Edit work item field using {{issue.description.match("\d{2}\/\d{2}\/\d{4}").toDate}}

However, haven't had any luck so far. 

 

Any help/suggestions are much appreciated.

Best,

Faheem

 

2 answers

1 vote
Duc Thang TRAN
Contributor
November 5, 2025

Hello @Faheem Mushreef 

Working with free text fields is quite tricky because users can enter data in the wrong format.
However, if we assume that the data is correctly entered For exemple : it contains 'Date – 10/11/2025' in the description 
Here’s something I can suggest:

Use smart values (text functions) to extract this string, -> more info https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/ 

either with "substringBetween", "after", etc., depending on your description format.

 

Then, use the smart value date function to convert it into a proper date. ->more info https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

.ToDate("dd/MM/yyyy")

Here’s an example I use for a similar need and how to apply a log action to check the result.

1 - Create a variable {{a}} = {{issue.description.substringBetween("Date – ","'")}}

2 - edit due date = {{a.ToDate("dd/MM/yyyy")}}

2025-11-06 08_38_36-Screenshots - File Explorer.png

Hope that helps

 

1 vote
Trudy Claspill
Community Champion
November 5, 2025

Hello @Faheem Mushreef 

Welcome to the Atlassian community.

It will help us help you if you provide screen images of your complete rule, the details of the steps where you are using smart values, the audit log output, and the original value of the Description field you are using for testing.

I also recommend that you make use of the Log action to print to the audit log the original data and the smart values you are trying to use.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events