I'm using an automation that adds the parent name and then a colon to the front of story summaries when a parent issue is added:
{{issue.parent.Summary}}: {{issue.summary}}
But this means that if someone changes the parent, then we end up with a story summary that has two parents at the front
New parent: Old parent: story summary
How do I create a rule that overwrites the original parent?
[The current rule won't work if issue creation is the trigger, since you add parent info after issue creation.]
Hi @Georgina Everett -- Welcome to the Atlassian Community!
First thing, what problem are you trying to solve by doing this? That is, "why do this?"
Knowing that may help the community to offer better suggestions as replicating the field text could cause problems / confusion (particularly if the rules do not run when expected).
Until we know that...
If your Summary field always has that colon as a delimiter and there are never any other colons in issue Summary fields (including the parent), the substringAfter() function could be used:
For example:
{{issue.parent.summary}}: {{issue.summary.substringAfter(":")}}
Kind regards,
Bill
Thanks Bill! I think your suggestion will work for us, so that's great, thank you.
As for 'why do this?', I hope that it will turn out to be unnecessary, but as colleagues get used to Jira, making the parent/epic as obvious as possible will help, especially as we sometimes have very similar tasks that belong to different epics. It also means that it'll quickly become clear to someone who's created an issue and attached it to the wrong thing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome @Georgina Everett ,
Haven't encounter a way to just replace or overwrite just portion of the text. Another way to approach it is to possibly create a hidden field that has a copy of the original summary when the issue was created. That way you can do something like this
{{issue.parent summary}} {{issue.originalsummary}}
There' a probably a good business reason why putting a parent summary is the child summary. I would suggest to seek alternatives other than updating the summary. Usually, that should be left intact and only state what the ticket is about. There's other ways to see the parent through other Jira boards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Benjamin. As in my response to Bill, above, I think this will be a short-term thing just to make things as easy to find/understand as possible, rather than a long-term action. Really appreciate you taking the time to respond!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.