Cloning Automation Query

John McDevitt
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!
December 4, 2024

Hey all,

I have a question around why this automation is not working the way it was intended.

I have designed an If-Else tree that checks a request submitted through the customer portal if the submission is a specific type of request and if it is, clone the request to a different board and close the original submission while linking it to the cloned request. 

The issue I am facing is that this automation is not cloning the data from the original submission to the cloned request, despite linking and closing the original request, indicating that the automation is completing but not as intended.

I am hoping for some clarity as to why this is not functioning as intended and any suggestions as to what I can do to resolve this would be greatly appreciated.

Below is a screenshot of the automation rule:

2024-12-04_13-43-38.png

1 answer

0 votes
Bill Sheboy
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.
December 4, 2024

Hi @John McDevitt -- Welcome to the Atlassian Community!

Normally for an automation question, posting the audit log details helps to identify what is happening.  Although with your rule structure, that may be difficult to follow check...

Instead let's start with some clarifying questions:

  • Is your Product field a single-selection, option field?
    • If it is, why not use a single if / else block structure to check each case to add the cloned issue?
  • You describe the rule "is not cloning the data from the original submission to the cloned request".  Are some of the fields not copying over, or none of them?
  • Which issue are you trying to assign in the rule: the trigger issue or the most recently created / cloned one?
    • As written, your rule is assigning the trigger issue
  • Your rule is always transitioning the trigger issue to Cancelled and then Closed, regardless of any value of the Product field.  Is that what you intended?

Kind regards,
Bill

John McDevitt
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!
December 4, 2024

Hi @Bill Sheboy-- Thank you!

To answer your questions:

  • Product is a single selection optional field
    • The reason it is not a single if / else block is so I could avoid setting up the Cancellation -> Closure for every single scenario, when all scenarios of these submissions will need to be Cancelled and Closed for reporting purposes
  • None of the fields are being copied over into the cloning issue
  • I am attempting to assign the cloned issue out and the original issue
    • In the If / else threads without cloning, those remain in the project that the customer portal is connected to but the others with cloning in the tree are going to a different project and require to be assigned out.
  • This is intended for all issues that are cloned so it sounds like I would need to remove this from the overall rule and limit it to specific branches in the if/else tree
Bill Sheboy
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.
December 4, 2024

Thanks for those answers, and...

Please post an image of one of the Clone Issue actions.  Please note that if a field is not selected in the action, the rule will try to copy it.

 

If none of the fields are copied over, this could be caused by a timing / racetrack error issue.  When the Issue Created trigger fires, it can happen so quickly that some issue data may not yet be available to the rule.  The fix for that is to always add the Re-fetch Issue action after the Issue Created trigger.  This will slow the rule a bit and reload the data before proceeding.

 

Next, from your rule image it appears the assignees of the cloned issues are different for the different Product values. 

What about the trigger issue: is the assignee different for the different Product values?  Let's assume the assignee is different for each case.

 

Putting this all together, try adjusting the rule to this, where I added fake values for Product:

  • trigger: issue created
  • action: re-fetch issue
  • condition: issue type equals ABC
  • if / else condition
    • condition: Product equals 123
    • action: assign issue (this will assign the trigger issue)
    • action: clone issue
    • branch: to most recently created issue (this will assign the cloned issue)
      • action: assign issue
  • else / if
    • condition: Product equals 456
    • action: assign issue (this will assign the trigger issue)
    • action: clone issue
    • branch: to most recently created issue (this will assign the cloned issue)
      • action: assign issue
  • ... continue for the cases needed, before finally transitioning the trigger issue...
  • action: transition issue to Cancelled
  • action: re-fetch issue
  • action: transition issue to Closed

 

One more thing: this rule will need to change its scope at the top to multiple-project (or global).  Otherwise the assignment of the cloned issues will not work.  Your Jira Site Admin will need to help with that as it is a global automation setting.

 

Suggest an answer

Log in or Sign up to answer