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
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")}}
Hope that helps
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.
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.