Hello!
I'm trying to create an automation that will set the value of a custom field to the same value as their parent Epic.
So far I was able to make it work only for already existing items within Epic, but cannot make it work to set the value for newly added child items or items added outside of the current Epic.
Please see 2 screenshots with the automations I tried.
I believe the problem is that when I create a task even using "Add a child issue" for the specific Epic, it doesn't relate to any parent/Epic yet so it cannot understand where to take the value from. This is how I understand the error message shown in audit log (see attached).
And only after I perform some changes on child item it gets the value from the parent Epic.
Please let me know how should I improve these automations to make them work correctly. I believe this should be a common use case but unfortunately I wasn't able to find some similar solutions.
@Vasilisa Yermakova, try using Value changes for: parent as a trigger instead of when an issue is created/updated. This will result in starting the automation only in case of a known epic.
I suggest creating a fallback option for issues that does not have an epic to clear the field value of them.
thanks a lot for your answer.
I was actually trying to use this trigger, but I didn't understand much its logic.
So the fact is that it works in cases when issue was created in backlog and then added to the Epic -> it works.
but in case if I try to create a new issue right under the Epic by using "add a child issue" button, the automation fails with the error in logs that I shared above.
I thought that newly created issue should be triggered as well, but it never happened.
What would be your recommendation for me to try next?
I'm new to automation and would highly appreciate any help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An automation rule of mine that sets a field when the issue is created or later the epic is changed would be as simple as the image shows:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Boldizsár Vermes this is so strange as I don't know what I can be doing wrongly..
I removed additional conditions to keep the rule as simple as it is on your sample,
but still no success with items created within the Epic - rule always fails.
And even for the other case when I link items to the Epic created outside of it - rule executes twice, where first execution always fails but the second works.
p.s. In all cases the rule tries to execute twice. does it works the same for you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I do not have double rule executions.
I guess changing the Epic works like clearing the previous one and adding the new one in two steps. I experienced the same before but not this time when creating the screenshot for you. Add an IF, ELSE condition after the trigger to set the given field only if the trigger issue has an epic:
You can use the else branch to empty the value of the given field of the issue if it does not have an epic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Boldizsár Vermes I wish it worked but there is still something wrong :/
after adding the if block the rule still tries to execute twice.
For items created without Epic and then added into it -> first execution does nothing, second execution successful
For items created within Epic via "Add a child issue" -> both execution do nothing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's strange.
First of all, be sure that the automation rule cannot be triggered by another rule. Have this checkbox unticked on the Rule details page:
Try to figure out why the rule is executed twice. What do you see in the history of the given issue after changing the epic? Has the parent been changed twice? Do you have another rule that touches the epic/parent field simultaneously?
Try putting Log actions into your rule to see the data it processes. What is the parent issue, what are the values of Milestone fields of the given issue and the parent issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please the details of the Edit issue field and also what exactly you want to achieve with the rule, it is not clear to me from your question. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sure, thank you
I tried both options to set "Issue to copy value from" as Epic issue and Parent issue.
For the first automation that works it is set to "Epic issue".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the rule I want to achieve that all child items inside the Epic got the same value for "test field" as it is for the Epic.
And the rule should be applied no matter if they:
- were inside this Epic before,
- were just added from backlog or from another Epic;
- or were just created by clicking "Add a child issue" right under that Epic
I hope it makes clear what I'm trying to achieve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @David Leal
I'll just ping you in case you don't get the notifications about new answers, thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vasilisa Yermakova sorry for the delayed response, I was busy, so basically what do you want when the epic changes the value for a given field, then you want it to propagate down the the corresponding child issues, correct?
I have a similar rule to this one, that I think is can help you for your purpose:
Lets say you want to populate down the component values:
Now you create a branch for all issues within that epic:
and you copy the component field from the epic:
I hope it helps,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @David Leal
thanks for your answer.
Actually, I was able to make the automation work for the case you described. So yes, if I change the field value for Epic -> it changes the same field for child items.
The case I'm struggling with is when I create new child items for the given Epic and want it to get the same value as Epic has (without changing the value for Epic, as it is already defined)
I was trying to use "Value changes for Parent Link", but it doesn't affect issues that I create within Epic using "Add a child issue" button. It works only for issues that I created in backlog with no Epic -> and only then put them inside the given Epic.
For this case I created a separate automation and this is how it looks like now:
Do you know how to solve this case? There must be some error as it doesn't work for me, but I don't understand what I'm doing wrongly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vasilisa Yermakova for this case in a similar way:
The rule is triggered when an issue is created, then you check it is not an Epic and it has an Epic linked, then you update your field (in the sample I use component) to update the field based on the corresponding Epic value.
The condition Epic exists is the following:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @David Leal
I've created the exact same rule, but still it shows that newly created issue didn't match the condition so the rule don't perform any actions.
Can it be that Epic still doesn't exist for the issue when I create it as a child for Epic?
As I understand from the audit log the operation that fails is "And Epic exists", but I don't understand why. I thought it may be connected to the "Rule restricted to projects", but I'm in the right project doing all these changes.
You can see on the screenshots attached the details from audit log and History for newly created issue (LTC-2088)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, the rule assumes the epic exists you need to link an existing epic on creation. The rule is triggered when the child issue is created. Did you try to log the information (Log Action) to see what is entering into the rule, to have more information.
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.