I'm trying to create an automation that will add a specific phrase (i.e. from the Epic Description to an Issue description when the issue is updated. I need to be able to copy the specific phrase from the epic description, which is unique to each epic. Therefore, I can't simply use the advanced field editing of:
{
"update":
{
"description":
[{
"add": {{issue.epic.description}}
}]
}
}
However, I've only been able to get it to copy the entire description, thus overwriting the issue description.
Any suggestions on how to copy over only the specific text using a dynamic search/match?
You can use the substring smart values to get the specific text if the description in the epic always have the same before and/or after text, something like this:
{{issue.description.substringAfter("Some text ")}}
Yes, and...to Mikael's answer:
Context is important for automation rules, and all of the parent epic's fields are not directly accessible to their child issues. Instead they may be found with branching, the lookup issue action, etc.
Please post an image of your complete rule and the audit log details. Those will help the community to suggest adjustments for your scenario.
Until we see those, an example to do what you ask would be:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the quick responses. I've tried a few variations but still no luck. :(
Here is a copy of what I'm wanting the automation to do:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Basically we have certain text between HAPPY and HAPPY in the Epic description that needs to be copied to the child issues when the issue has the label Feature.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The description field is not a list: it is a text field, and so that is the incorrect syntax for the JSON. Regardless, that JSON is not needed as the text and smart values can be entered directly when editing the description field.
You originally noted copying information from the trigger issue's parent: an epic. Your rule no longer seems to match that.
Let's clarify some things:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the questions Bill.
1. The issue hierarchy is Epic - Issue (Story, Task, Bug) - Subtask (where applicable).
2. The desired outcome for the trigger issue's description is to have the "HAPPY some text HAPPY" statement copied from the Epic Description to the end of the child Issue Description.
Trigger (child) Issue Description beforeL
User Story details & AC
Trigger (child) Issue Description after:
User Story details & AC
HAPPY some text HAPPY
3. As for a child issue not being assigned to an Epic, we have other automations and audit processes to capture these. So if the trigger Issue does not have a parent Epic at the point that this rule is run, then I do not want anything added.
The main issue is that I cannot wrap my head around how to format the automation step to have the "HAPPY some text HAPPY" statement added to the end of the trigger issue description and what format / syntax the JSON should be (if any).
I appreciate your assistance in this. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for clarifying...putting together what Mikael and I suggested, these changes could help:
{{issue.description}}
{{issue.parent.description.substringAfter("HAPPY").substringBeforeLast("HAPPY")}}
This will add the extracted section from the parent's description after the trigger issue's description.
Please note: in this case, the parent's description is available. Not all fields of the parent are available to a child issue, and so testing is needed for other fields.
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.