Create a sub-task for each component

Use case

Create a sub-task for each selected component of the transitioned issue. A different component of the main issue will be inherited by each sub-task.


⚒️ Configuration

Mode*

Choose Multiple issues based on a text list and enter the following expression with the expression editor set to General mode.

Expression

%{toStringList(%{issue.components.id})}

The number of elements in the text list defines the number of issues to be created.

Variant

%{except(toStringList(%{issue.components.id}),fieldValue(%{issue.components.id}, subtasks()))}

In order to avoid the creation of sub-tasks that have already been created, this expression excludes from the list the IDs of the components that are already included in the sub-tasks.

Issue type*

Choose Selected issue type.

Specific issue type

Choose Sub-task.

Parent issue*

Choose Current issue.

Summary*

Enter the following expression with parsing mode set to General.

Bash
Sub-task for %{getMatchingValue(%{seed.text}, toStringList(%{issue.components.id}),toStringList(%{issue.components}))}

This expression will return the name of the component associated to the ID.

Description

To enrich the issue with more information, you might want to add a short description.

Components

Select and update the Components fields manually with the following expression in General mode.

%{seed.text}


📚 Related examples