Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple clone issue depending on list of custom field

Jurgen Tyvaert August 23, 2021

Dear,

I want to automatically clone an issue depending on the input of a custom field named "product". When an issue is created the creator can select multiple products which are then added to the custom field "product".

When an transition is made JIRA should automatically make the same amount of clones as there are products defined in the custom field "product".

Do i need to write a script and if so where can i find the language of the code to do so?

 

Many thanks.

2 answers

0 votes
Nishanth Thimmareddy (Appfire)
Atlassian Partner
August 23, 2021

Hi @Jurgen Tyvaert 

Welcome to the Community!

You can use Create on Transition for Jira cloud/ DC/ Server app to bulk create issues on any transition in the workflow through custom fields using the "Create multiple issues" and substitution variables feature. You wouldn't need any code/ script to do this. A quick how-to tutorial/ guide to do this: link

Please let me know if you have any questions!

Full disclosure, I'm the product manager for the app.

Thanks,

Nishanth T

Jurgen Tyvaert August 24, 2021

Hi Nishanth T, thank you for the welcoming.

After installing the free trial of the "Create on Transition for JIRA app" i have made a new post function, see picture below, without success. What am i doing wrong.

create on transition original_product.JPG

Nishanth Thimmareddy (Appfire)
Atlassian Partner
August 24, 2021

Hi @Jurgen Tyvaert

Thanks for trialling Create on Transition for Jira. Few points:

  1. I'd recommend using %original_<field>% like %entry%-%original_summary% etc throughout the post function (description, issue type, attachments, comments etc)
  2. For link, you can choose the link type you'd want to provide. "Create on Transition" was just an example in the tutorial for a book publishing workflow (I have used Cloners in the below screenshot)
  3. In the Create multiple issues field, please use the custom field substitution variable in this format: %original_customfield_<id>% so that it's scalable and reliable
  4. Small spell check in substitution variable of description

Here is the below-working post function for this automation:

1.png

Please let me know if you still have issues or our support can help you super quick. 

Thanks,

Nishanth T

Jurgen Tyvaert August 24, 2021

Hi Nishanth T,

Please see my second attempt in the picture below.

The multiple issues are limited to only one issue. 

The description is not copied from the parent to the clone

Each new issue should hold one and only one custom field from the list of custom fields defined in the parent issue. How can this be automated?

 

2de create on transition original_product.JPG

Jurgen Tyvaert August 24, 2021

Hi,

I double checked the syntax and found the error: <10400> in stead of 10400 in the "Create multiple issues".

The transition now makes new issues as many as there are products.

The description is still not this of the parent.

The status of the issue is set back to the start status of each new issue. How can i set the status to a know value of another definied workflow?

3de create on transition original_product.JPG

Sreeja Manchala {Appfire} August 24, 2021

Hi @Jurgen Tyvaert ,

Good day, I am Sreeja Manchala from the Bobswift support team. We have created a support request https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-7769 to better track your request. However, we couldn't add you as a reporter. Please sign up using this link https://bobswift.atlassian.net/servicedesk/customer/portal/1/user/signup and share the user name/id. We'll then add you as the reporter and confirm.

In order to have the custom field value for each newly created issue, please add the custom field value as %entry%.

Attached screenshot for your reference.
COT custom field.png

By using the value as %entry%, the newly created issues will have a single custom field value from the parent issue.

And with respect to the description, %parent_description% should copy the parent issue description to the newly created issues.

Regards,
Sreeja

Jurgen Tyvaert August 24, 2021

Hi Sreeja,

Thanks for the advice. I have signed in with Jurgen Tyvaert.

I have tried your proposal and indeed the custom field is now entered in the new issues. However the description is not copied from the parent issue.

Can you also indicate how i can copy the status from the parent issue. I have tried to fill in "Copy parent issue custom fields" as well as in "Copy original issue custom fields" with "status" but the status doesn't become the same as the parent.

Sreeja Manchala {Appfire} August 27, 2021

Hi @Jurgen Tyvaert ,

Hope you are doing great!

As informed earlier, we have created a support request for your reported issue and made you the reporter.

Please let us know if you are able to access this ticket https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-7769 and provide us the requested information in the support ticket.

Looking forward to your reply!

Regards,
Sreeja

0 votes
John Funk
Community Champion
August 23, 2021

Hi Jurgen - Welcome to the Atlassian Community!

How many different options are available for the Product field? 

I would create an automation rule with a series of IF conditions based on the product field. 

The condition would be something like Product = X then clone the card.

If Product = Y, then clone the card,

If Product Z, then clone the card, etc. 

Jurgen Tyvaert August 23, 2021

Hi John, thank you.

The list of products is long and changes in time so the query or automation rule should cope with this.

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events