Hi everyone I have an issue with my automation rule below. This is working but I am getting some colleagues informing me is removing their team field from the newly created issues, even if those issues don't have a parent.
{
"fields": {
"team": "{{issue.epic.team.id}}"
}
}
HI Dean,
You should add an condition before this action as if only the issue has a linked epic, then only this action should be performed.
Now, this action is always executing & for the issues which does not have linked epic, so it is not getting any team id, so removes it.
I hope it clarifies the problem & you solve it.
I am very new to the whole automation feature, may I ask how can I apply that condition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Dean,
I am unable to upload a picture due to some issues at this moment, but let me try to explain it here.
After the trigger & before the action insert a condition.
Use a JQL condition. JQL would be like this: "Epic Link" is not Empty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Dean Pellizer
Welcome to the Atlassian community!
Please show us the entire rule. The execution of steps is very dependent on the context at the time the step is executed. We can't tell you conclusively why your rule is doing what it does without all the information.
@Barnali Putatunda presents a very good suggestion that might solve your issue, but it really depends on seeing all the steps in the rule.
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.
Yes, as written this would remove the value in the field when the issue does not have a parent, because you have no condition to ensure that the created issue has a parent. In that case, the step to Edit the issue is still executed, but no value can be found for the smart value you specified. That is not recognized as an error. Instead the issue being edited ends up with its Team field set to null.
Since your smart value references Epics, I assume that you want this to execute only for standard level issues types (i.e. Story, Bug, Task, etc.) and not for created Epics or Subtasks. In that case I recommend that you add a condition after the trigger to check that the issue type is not Epic and not in subtaskIssueTypes().
Next I would add a Condition/Related Issues to ensure the trigger issue has a parent Epic.
And then have your Action to Edit the issue. Then the trigger issue will only be edited if it is a standard level issue that has a parent Epic.
You might also want to consider whether or not you want to copy the Team field from the parent Epic if the Team field in the parent Epic is blank but the Team field in the trigger issue is not blank.
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.