YouTrack Standalone 7.0 Help

Subtask Inherit Fix Versions

This workflow automatically updates the fix version of a subtask to the fix version set for a parent task.

File Namejetbrains-youtrack-subtaskInheritFixVersions
Auto-attachedyes
RulesSet parent 'Fix versions' to added unresolved subtasks (stateless)
Set added parent 'Fix versions' to unresolved subtasks (stateless)

Use Case

This workflow helps you manage the fix version set for tasks and subtasks.

Rules

This workflow includes two rules.

Set parent 'Fix versions' to added unresolved subtasks

This rule checks a subtask when it is linked to a parent task.

  • If the subtask belongs to a different project from the parent task and the projects use different sets of values for the Fix versions field, the fix version is set for the parent task only.
  • If the subtask and parent task belong to the same project, the fix version assigned to the parent task is set as the fix version for any unresolved subtasks.
rule Set parent 'Fix versions' to added unresolved subtasks when parent for.added.isNotEmpty { for each subtask in parent for.added { if (project != subtask.project && issue.project.valuesFor(Fix versions).first != subtask.project.valuesFor(Fix versions).first) { continue; } if (!subtask.isResolved()) { subtask.Fix versions.clear; for each version in Fix versions { subtask.Fix versions.add(version); } } } }

Set added parent 'Fix versions' to unresolved subtasks

The next rule checks for subtasks when a fix version is set for an issue.

  • If the subtasks are in an archived project or belong to a different project from the parent issue and the projects use different sets of values for the Fix versions field, the fix version is set for the parent task only.
  • If the subtasks are in an active project and belong to the same project as the paren task, the fix version for each unresolved subtask is set to the fix version set for the parent task.
rule Set added parent 'Fix versions' to unresolved subtasks when Fix versions.added.isNotEmpty { for each subtask in parent for { if (subtask.project.isArchived() || project != subtask.project && issue.project.valuesFor(Fix versions).first != subtask.project.valuesFor(Fix versions).first) { continue; } if (!subtask.isResolved()) { subtask.Fix versions.clear; for each version in Fix versions.added { subtask.Fix versions.add(version); } } } }
Last modified: 2 February 2017