Get and use date as due date

Geoffrey Jonkers
Contributor
August 29, 2023

Hello,

We're wondering if someone could help us further with the following challenge :)
We're trying to capture a date in the description field (Effective date: 2023-08-28) and use this as the due date. Sadly we're unable to figure out how this works.

We're starting with the Advanced compare condition. 
{{issue.description}}
Contains
regex .*Effective date: ([0-9]{4}-[0-9]{2}-[0-9]{2}).*

And this will not work, of course we tried many options here but are still unlucky.
Who could help us further In this case :)

2 answers

1 accepted

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2023

Hi @Geoffrey Jonkers 

I just tried this in my test environment

{{issue.description}}
Contains Regex
(\b\d{4}-\d{2}-\d{2}\b)

Your Due Date would be populated like this:

{{issue.description.match("(\b\d{4}-\d{2}-\d{2}\b)")}}
Geoffrey Jonkers
Contributor
August 29, 2023

Hi @Mark Segall 
Could you tell me what's wrong in here?

image.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2023

There's a specific condition in the dropdown for Contains Regex.  Use that and remove "regex" from the second value field.

Geoffrey Jonkers
Contributor
August 29, 2023

Ahhh gotcha. I'll play arround with that one :) Thanks!

Like Mark Segall likes this
Geoffrey Jonkers
Contributor
August 29, 2023

One more, question maybe.
Is there an option to include the Effective date part?

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2023

Yes - You should be able to just update the regex to this:

(Effective date: \b\d{4}-\d{2}-\d{2}\b)
Geoffrey Jonkers
Contributor
August 30, 2023

It works if I make the Effective date not bold. In our case it's bold.
Tried single and double * but seems not to work.

nest step for us is changing the layout. from yyyy-mm-dd to -> mm-dd-yyyy (for DueDate)
 We have this;
image.png

Follow with
a new variable which is 


{{extractedDate.subStringAfterLast("-")}}-{{extractedDate.subStringBeforeLast("-").subStringAfter("-")}}-{{extractedDate.subStringBefore("-")}}"

Like Mark Segall likes this
Geoffrey Jonkers
Contributor
August 30, 2023

Before I forget. Many kudos! Really happy with your help in this case :)

Like Mark Segall likes this
0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2023

Hi @Geoffrey Jonkers ,

not sure if this helps you or not but I leveraged the following article in the past for a similar need - How-to-parse-the-description-field-for-values-to-put-into-other-Jira-custom-fields .

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events