Hi there,
Consider the following, a ticket is created with the following string in the summary:
"Put server in Maintenance mode for FC1.2 Deployment at 13:30:00 GMT-0500 (Mountain Daylight Time) on Thu Jun 29 2023"
Each time a ticket is created, the section "Put server in Maintenance mode" is consistent, while "FC1.2" changes, the time "13:30:00 GMT-0500" changes, as well as the date.
What I'm looking to do is extract the time "13:30:00" and replace it in the Summary with a time 30 minutes prior (e.g. "13:00:00")
I have an automation rule that is triggered when this issue type is created and using regex to match the string using (which passes)
{{issue.summary}}
contains regular expression
((Put server in Maintenance mode for .* at )\d{2}:\d{2}:\d{2})
Next I use the Edit Issue action to update the time in Summary using the following:
{{issue.summary.replaceAll("(?<=Put server in Maintenance mode for .* at )\d{2}:\d{2}:\d{2}", {{now.minusMinutes(30).format("HH:mm:ss")}})}}But I keep getting the error "Error rendering smart-values when executing this rule:"
Any idea how (or if) I can update the Summary using this combination of regex, smart values and smart functions?
Thanks!
Jason