How to extract a date in long date format from the Summary of an issue using Jira Automation

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

How to Pull a long date (for example February 20, 2023) from the Summary of an issue and edit the "Start Date" custom field using Jira Automation.

Solution

Following JSON code contains smart values which needs to be mentioned in "Additional Fields" section of "Edit Issue" action.

1 2 3 4 5 {  "fields": {  "customfield_10082": "{{issue.summary.match("(\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May(?:)?|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sept(?:ember)?|Oct(?:ober)?|Nov(?:ember)|Dec(?:ember)?) (\b\d{1,2}\D{0,3})?.\s\b(?:19[7-9]\d|2\d{3}))").toDate("MMMM dd, yyyy").format("yyyy-MM-dd")}}"  } }

Automation Preview:

When: Issue created. IF: Summary starts with New Hire. Then: Edit issue fields Advanced.
  • My custom field id for Start Date test is "customfield_10082"

  • Used Smart value "issue.summary.match" along with Regual Expression(REGEX) which will fetch the date in string format.

  • Used ".toDate("MMMM dd, yyyy")" to convert string into date format.

  • Then format date from "MMMM dd, yyyy" to "yyyy-MM-dd"using ".format("yyyy-MM-dd")}}" as my format on custom field is  yyyy-MM-dd.

Updated on March 14, 2025

Still need help?

The Atlassian Community is here for you.