How can I automate creation of tickets linked to an Epic based on the components list in the Epic?

Michael
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 4, 2021

I'm using the automation plug-in on our JIRA server instance.  I would like to be able to create issue tickets that each have an Epic Link to a given Epic where I'm manually launching an automation rule.  The Epic will have a list of components, and each issue created must uniquely map to one of the components in the list.  For example, say I have an Epic called "Epic A", and Epic A has three components specified, "A", "B", and "C".  When I execute the rule, I would like three new issues created.  The first will map to the "A" component, the second to "B", and the third to "C".

I think I can hardcode a comparison step for each of the various components in the rule and the creation steps for each issue, but I have a lot of components and that would be a huge amount of replication.  Instead I would like to do some kind of iterative approach, like iterating over each entry in the components list and creating a ticket with the matching individual component.  But I can't figure out a way to do that.

I looked at smart values and list operations, and it seems I can extract components at a given index, but I can't figure out a way to create an index variable and then use that in my rule to iterate over the list and create a new ticket and apply the component at that index.

Can someone advise on this?

4 answers

1 vote
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2021

Hey there Michael,

If you're using cloud you can now loop over smart values as mentioned at https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935

branching.png

You can then use the name of component as a summary of the create issue task like {{component.name}} and the set the Epic Link to be {{triggerIssue}}

Cheers,

Mark C

Piotr Zadrożny _Eyzee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2021

Thats great :) 

I have just created rule that create subtasks based on parent components using this advanced branching. Works as charm.

1 vote
Nishanth Thimmareddy (Appfire)
Atlassian Partner
August 5, 2021

Hi @Michael

Welcome to the community!

You can use Create on Transition for Jira Server app to be able to automate the creation of linked tickets to an epic based on the list of components in the Epic. Here is a quick tutorial on how to create multiple issues based on a particular field while creating an issue (in your case, the epic itself).

In the above tutorial, you will have to do three more things differently:

  1. In the components field, enter %entry% to set the component to the respective component
  2. Add a condition to create only when the issue type is Epic
  3. Use %original_components% for the field "Create multiple issues" field under the Conditions & configurations tab

The post function can be configured when the epic is transitioned to any status or in the Create transition.

I'm the product manager for the app. If you have questions or feedback about Create on Transition for Jira, please get in touch with us directly.

Thanks,

Nishanth T

1 vote
Julien Peyrade _ Elements
Atlassian Partner
August 5, 2021

Hi @Michael 

I believe our Marketplace add-on Elements Copy & Sync will let you do exactly this, quite easily.

For your use case, I would advise using an operation which lets you create issues dynamically from an Epic, depending on the number of components in the Epic, and create Epic Links between each issue and the Epic.

The configuration would look exactly like this:

dynamic-epic-links-with-copy-and-sync.png

Here is the link to our documentation which explains it in more details.

Full disclosure : I'm the Product Manager for the add-on.
If you have questions or feedbacks, do not hesitate to contact us through our support portal.

Julien

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2021

Hi @Michael

My advice would be to use another plugin that provides sil or groovy scripting. (Scriptrunner, powerscripts, June, etc.).

For simple automatons, Jira automation is great, but for what you are explaining, it becomes a nightmare.

Cheers.

Suggest an answer

Log in or Sign up to answer