Forums

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

Extract date in MMM dd format from issue description and set custom field

Dutchie April 13, 2025 edited

Hi community!

I'm trying to extract a date in the format MMM dd from an issue description and set that as a value in the due date. The regex I have for this is:

[A-z]{3},\s([A-z]{3}\s\d\d?)\s{3}[A-z]{3},\s[A-z]{3}\s\d\d?

This extracts the right date from the description, but I've been unsuccessful in converting this to a format that I can set in a date field.

This is what I've add as a log action which returns the expected date {{issue.Description.match("[A-z]{3},\s([A-z]{3}\s\d\d?)\s{3}[A-z]{3},\s[A-z]{3}\s\d\d?")}} but whenever I've tried to format it, the log entries go blank.

2 answers

1 accepted

2 votes
Answer accepted
Dutchie April 13, 2025

Realized that the reason this wasn't working for me is that you can't match and convert at once. I needed to create a variable for the the date where I added the year and then converted it to a date format.

 

Create variable varStartDate - {{issue.Description.match("[A-z]{3},\s([A-z]{3}\s\d\d?)\s{3}[A-z]{3},\s[A-z]{3}\s\d\d?")}}, {{now().format("yyyy")}}

Convert variable to date {{varStartDate.toDate("MMM d, yyyy")}}

 

0 votes
Vikrant Yadav
Community Champion
April 13, 2025

Hi @Dutchie Welcome to Atlassian Community!

The duedate must be of the format "yyyy-MM-dd", then only automation set duedate field value

Dutchie April 13, 2025

Thanks @Vikrant Yadav 

Like Vikrant Yadav likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events