Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,425
Community Members
 
Community Events
184
Community Groups

Update summary with updated due date

I currently have subtasks with dates in the summary like this "Attendee analysis (03/29/2024)" using format("(MM/dd/yyyy)")

 

I want the date in the summary to change if I change the due date. For example, if I changed the due date to April 2nd the summary would update to "Attendee analysis (04/02/2024)"

 

I've tried these but with no success:
{{issue.summary.replace("(\d{1,4}([.\-/])\d{1,2}([.\-/])\d{1,4})","duedate.format("(MM/dd/yyyy)")}}

{{issue.summary.replace("(MM/dd/yyyy)","duedate.format("(MM/dd/yyyy)")}}



replaceAll(String regex, String replacement)

Performs a regular expression search and replaces any match with the replacement. $1 can be used to access a matching group in the replacement.

More info on String.replaceAll(String, String)

2 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 12, 2023

Hi @Kara Cooper 

Please try escaping the parentheses around your date in the regular expression.  Like this:

{{issue.summary.replaceAll("(\(.*\))",issue.duedate.format("(MM/dd/yyyy)"))}}

And...because you are replacing the date, there is no need to reference the captured group from the regular expression search.

Kind regards,
Bill

It worked! Thank you!

Like Bill Sheboy likes this

@Bill Sheboy is it possible to write an automation to add the due date to the summary if it was not included initially and I use | as a consistent text separator?

subtask before "Attendee analysis | [Webinar] ABC"

parent task "[Webinar] ABC"

subtask after automation "Attendee analysis (03/29/2024) | [Webinar] ABC"

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 12, 2023

Yes, that is possible...Use a similar regular expression in an Advanced Compare Condition to check if it is present/or not...adding when needed.  I recommend using if/else conditions to handle the two cases: present or not.

Suggest an answer

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

Atlassian Community Events