Hey everyone,
I'm looking for some direction on how to remove or replace text from the summary if issues.
Context:
So when an issue is created, we have an automation rule that adds code names from a multi-picker field into the summary between square brackets.
So it goes from "This is the issue summary" to "[CODE NAME 1, CODE NAME 2] This is the issue summary"
Goal:
Now, I'd like to create another automation rule for when the code name field is updated to remove or replace the text within the brackets.
Any ideas would be appreciated.
Hello @Suzy Nicholson
You can use the "replace" function to replace text in a field using the field's smart value.
Here are a post that might help:
(credit to @Bill Sheboy )
And on this page you can find information about the "remove" and "replace" functions.
https://confluence.atlassian.com/automation/jira-smart-values-text-fields-993924863.html
You can do this by using smart values, one that comes to mind would be to use {{issue.summary.substringAfter("] ")}}, that should give you "This is the issue summary" and you can then use that to create your new summary. You can find more smart values that can be used with text fields here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's a great suggestion. There are also some cases where we might have two sets of square brackets, is there a way to specify the last "] "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you can use substringBeforeLast(String separator) to do that.
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.