Having difficulty using replace in an automation rule. Referencing this documentation Jira smart values - text fields
Actual Summary: [PDI-1234] - Testing
Desired Summary: [ER-1234] - Testing
Attempting: {{issue.summary.replace("PDI","ER")}}
Produced:
Hi @Margaret Medon
Could you give us more details regarding your automation?
It worked well for me...
Just to verify: You are certain "[PDI-1234] -" is part of the summary field value? Looks to me like that combination of issue.key and summary.
Thank you for responding, this is the complete rule in my sandbox.
I am pretty confident my issue is the Edit Issue step because when I replaced the JSON with:
{ "fields": { "summary": "woohoo! a new summary" } }
it worked.?
Yes! the PDI # is an external number captured by an integration.
Thanks for the follow-up.
Hey, why don't you select the field "Summary" instead of using the advanced function? As you are using a smart value
@Margaret Medon
in additional fields it needs to look like this (worked for me):{"fields": {"summary": "{{issue.summary.replace("PDI","ER")}}"}}
But I agree with @Bastien Delourmel _FMX_ . Much easier his way.
It looks like you're new here. Sign in or register to get started.