Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

[Jira Automation] - clone issue as sub-task to another specific issue

Danielle Bonneau
Contributor
September 8, 2021

hello!

I am attempting to do the following:

When a specific label is added to a ticket, clone that ticket as a sub-task to a SPECIFIC ticket in the Backlog (that isn't the Trigger or Current issue).  

What I can't figure out is how to specify the parent ticket.  I only see the option of setting the parent as the Current or Trigger issue, and if I try to add branching for the specific ticket I'm looking for, it clones the specified ticket, not the original trigger one.

I've tried these actions, all of which only seem to allow you to select the Current or Trigger issue as the parent:

Clone issue

- create sub-tasks 

- Create issue

- Link Issue (tried to link it to the ticket i want then clone to link, but again, only can link Trigger or Current issue)

 

Thank you for your help!

-Danielle

2 answers

1 accepted

1 vote
Answer accepted
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.
September 8, 2021

Hi @Danielle Bonneau 

I recall seeing this question in a similar post a while ago, and there wasn't a resolution using one rule.  To save you some time, it appears that you also cannot change the parent of a sub-task using JSON.

A convoluted work-around would be to use two rules and a custom field.  For example:

Rule 1: triggered on your case of the label being added, and then add *that trigger issue's key* to a custom field in the future parent ticket (e.g. named IssueToClone)

  • trigger: label field changed
  • condition: label changed to your specific value
  • branch: on JQL to the specific new sub-task parent  (It is unclear how you planned to do this...)
    • action: edit issue to set the custom field (IssueToClone) to the trigger issue's key

Rule 2: triggered on a value change for the custom field.  In rule details, enable the "Allow Rule Trigger" option to allow Rule 1 to trigger Rule 2.

  • trigger: field changed for IssueToClone
  • condition: IssueToClone is not empty
  • branch: on JQL for key = {{issue.IssueToClone}}
    • action: clone the issue, changing issue type to sub-task and changing the parent to Trigger Issue

Kind regards,
Bill

0 votes
Marlene Kegel - codefortynine
Atlassian Partner
September 9, 2021

Another option would be our Jira cloud app Deep Clone for Jira.

Our app can be integrated with Jira Automation using looping transitions. The clone gets triggered by a post-function, but since the transition is looping the status won't change.

Setting up the Deep Clone post-function and define the parent issue is very easy, as you can see in the attached screenshot.

If you have questions or feedback, don't hesitate to contact us.

deep-clone-jira_post-function.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events