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:
Could you give us more details regarding your automation?
It worked well for me...
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.?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, why don't you select the field "Summary" instead of using the advanced function? As you are using a smart value :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! I didn't know that I could solve the problem using his suggestion. Thank you both so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes! the PDI # is an external number captured by an integration.
Thanks for the follow-up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.