Subtask Inherit Assignee
This workflow automatically sets the assignee of a subtask to the user who is assigned to work on the parent task.
File Name | jetbrains-youtrack-subtaskInheritAssignee |
---|---|
Auto-attached | no |
Rules | Inherit parent Assignee to subtasks (stateless) Update subtasks Assignee on parent Assignee changing (stateless) |
Use Case
This workflow helps you manage the assignment of tasks and subtasks.
Rules
This workflow includes two rules.
Inherit parent Assignee to subtasks
This rule checks a subtask when it is linked to a parent task. If the subtask is not assigned, the issue is assigned to the assignee of the parent task.
rule Inherit parent Assignee to subtasks
when parent for.added.isNotEmpty {
for each subtask in parent for.added {
if (subtask.Assignee == null) {
subtask.Assignee = Assignee;
}
}
}
Update subtasks Assignee on parent Assignee changing
The next rule checks for subtasks when an issue is assigned to another user.
- If the subtasks are in an active project, the assignee for each subtask is set to the assignee of the parent task.
- If the subtasks are in an archived project, they are ignored.
rule Update subtasks Assignee on parent Assignee changing
when Assignee.changed {
for each subtask in parent for {
if (subtask.project.isArchived()) {
continue;
}
if (subtask.Assignee == Assignee.oldValue) {
subtask.Assignee = Assignee;
}
}
}
Last modified: 2 February 2017