Can we create different issues based on multiple component selection using postfunction/automation?

Kavya March 14, 2024

Hi Team,

We have requirement to create different child issues based on component selection on parent issue creation.

Ex: If we select component C1,C2,C3 3 separate issues should be created with same component names, if we select only C2,C3 two issues should create with same component name. Is it possible in jira with Automation or with any other ways?
Please help me with this.

Regards,
Kavya

3 answers

0 votes
Duc Thang TRAN March 14, 2024

Hello @Kavya 

After analyzing your request, I can suggest using the following smartvalues: {{issue.Components.size}} to create conditions for 2 or 3 components 

For  summary of these futurs issue,  use this smartvalue to get the first and the last name components 

{{issue.components.name.split(" ").first}} / {{issue.components.name.split(" ").last}}

 

My difficulty  is that I haven't been able to find a regex yet to retrieve only the name of the second component if the ticket epic has three components. 

I'll let you proceed and find a solution. Here's the link to all the smartvalues for text fields

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

2024-03-14 13_54_48-Window.png2024-03-14 13_52_21-Window.png

0 votes
Marc Koppelaar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2024

Hi @Kavya 

Welcome to the community.

The is can be done with automation.

What would be the trigger for the creation of the child issues?

Example:

Screenshot 2024-03-14 at 11.00.55.png

Kavya March 14, 2024

Hello Marc,

Thank you!

Your If condition may be works only if I enter all components list value, I am testing with 3 components list now I tried by entering 2 but didn't work.

I want to create separate stories under epic (once epic created) based components entered, suppose I entered C1, C2 I need to separate tickets one with Component C1 and one with C2.

In your case even I don't have option to set different summary and component value to the child issues.

Regards,

Kavya

Marc Koppelaar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2024

Hi @Kavya 

I do think you could figure this out yourself to add different fields to issues that need to be created.

I made an example automation for you.

 

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2024

Hello @Kavya 

Welcome to the Atlassian community.

Do I understand correctly that you would want one issue created for each component value?

Would the information in the issues be the same as the parent or as each other (except for the Component value), or does each issue need unique information?

Are you needing to create sub-tasks, or child issues under an Epic?

Would all the newly created issues be the same issue type?

Kavya March 14, 2024

Hello Trudy,

Thank you!

Yes, component is multi select field list if I select 2, two issues should be created for each component value.

For now I want component and summary should be different for the created issues.

I have Epic, once epic created in project based on component selection in Epic the Story issues should be created inside epic.

Yes, all the new issues should be type of story.

Please let me know if there are any ways to achieve it.

Regards,

Kavya

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2024

The values that are available in the Components field can change over time.

Do you want to create a child Story for each Component value, regardless of what that value is, or do you want to create child Stories only for a specific subset of Component values.

Let us say you currently have three Component values available. Then, two weeks from now, you add a fourth value to the list of possible Component values. Would you expect your automation rule to start creating a Story for that fourth Component value if it is used in an Epic?

If the Summaries for each created issue need to be different from the others, what do you currently do to make that value different?

Suggest an answer

Log in or Sign up to answer