I have a use case where I want to replace the date in a summary with the date from a date field in the same issue. I have a not-quite-working automation, with help from @Bill Sheboy here: https://community.atlassian.com/t5/Jira-questions/Update-summary-with-updated-due-date/qaq-p/2329197
But, the regex of (in the example linked post)
{{issue.summary.replaceAll("(\(.*\))",issue.duedate.format("(MM/dd/yyyy)"))}}
doesn't quite work and my date format is yyyy-MM-dd and despite changing the regex in the replaceAll to
{{issue.summary.replaceAll("(-(.*-))",issue.customfield_15528.format("yyyy-MM-dd"))}}
the summary of "2024-11-20 Summary text" here gets replaced with "20242024-11-21y text" with the new date being 4 characters out of place to the right and overwriting half of the date and some of the summary text.
I cannot seem to get the regex in the replaceAll working properly.
I think you might miss a ( in the smart value clause, in front of yyyy.
I see 4 ( opens and 5 ) closers in your value.
{{issue.summary.replaceAll("(-(.*-))",issue.customfield_15528.format("(yyyy-MM-dd"))}}
Could it be the missing (?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.