Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Extract a date from summary string and apply to Due date

Hi community,

I am trying to extract a date from summary and apply that date to the Due date field. I have a similar challenge as mentioned in this post but my date appears in the middle of the string and not at the end, hence making the right() function unusable here.

I thought I could use the match() function but have not succeeded.

Here is my summary: Create New User Bill Gates (NYC) on 10/30/2021 is approved

I would like to extract 10/30/2021 from this string.

I have unsuccessfully tried putting the following in an edit issue fields component: {{issue.summary.match("(\d+\W\d*\W\d*)").toDate}}

 

Any tips much appreciated!

 

Best regards
Thomas

1 answer

1 accepted

7 votes
Answer accepted

Hi @Thomas G,

The following automation rule should meet your needs:

rule-details.png

Here are the details of the Create variable action:

variable.png

You can copy the smart value below:

{{issue.summary.match("(\d{1,4}([.\-/])\d{1,2}([.\-/])\d{1,4})")}}

Here are the details of the Edit issue action:

edit.png

You can copy the smart value below:

{{newDueDate.toDate("MM/dd/yyyy")}}

Let me know if this works on your side too!

- Manon

Hi Manon and thank you for your swift reply. Much appreciated!!

Your solution works perfectly 😃

I also tried skipping creating the variable and simply adding the date formatting (tip by you) in my original config, and that works too. 

{{issue.summary.match("(\d+\W\d*\W\d*)").toDate("MM/dd/yyyy")}}

 

Thanks again and have a great day ahead!

 

Best regards
Thomas

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

246 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you