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)")}}
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)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been using these as references:
https://confluence.atlassian.com/automation/text-functions-993924863.html
https://community.atlassian.com/t5/Automation-questions/Extract-a-date-from-summary-string-and-apply-to-Due-date/qaq-p/1838455
https://community.atlassian.com/t5/Jira-questions/How-to-extract-date-from-the-Summary-Field-in-Jira/qaq-p/1946675
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.