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.
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")}}
Hi @Dutchie Welcome to Atlassian Community!
The duedate must be of the format "yyyy-MM-dd", then only automation set duedate field value
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.