Auto Clone a task as a subtask in another project when you link to the Parent in the other project

Karen Kelly
Contributor
February 15, 2023

I have a project where we import trades from a spreadsheet every day as standard Task tickets in ARBBLOTTER. 

Instead of going into our POSKEEPER project and creating BUY and SELL subtasks linking to the relevant tickets in the first project under the relevant Parent tasks I want to automate this process.

I see that you cannot move tickets between projects with automation so if I was able to clone them and select the correct parent task to create these subtasks in that would be good, but there is no 'Destination Issue' option in the 'Parent Issue' drop-down only 'Current issue' and 'Trigger Issue'.

 

Screenshot 2023-02-15 at 10.20.15.png

 

 

I found this solution that got me there half way, but not quite: https://community.atlassian.com/t5/Jira-Core-Server-questions/Jira-automation-convert-a-task-to-a-sub-task-and-link-it-to-a/qaq-p/1294818

2 answers

1 accepted

0 votes
Answer accepted
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.
February 15, 2023

Hello @Karen Kelly 

You should be able to simply type into that field to add a smart value reference.

Screen Shot 2023-02-15 at 11.56.28 AM.png

 

After typing in the entire smart value you need to click on the "Smart value ..." text displayed below the field to actually insert the smart value into the field.

Screen Shot 2023-02-15 at 11.58.24 AM.png

Karen Kelly
Contributor
February 22, 2023

@Trudy Claspill Thank you so much! This is working beautifully. Just finding another glitch... Seems like when you clone the issue the fields linked to Asset Attributes loses their values.

I have 3 fields linked to Assets and only 1 of them seems to update when I use the following code using my correct Application ID, how do I get field 2 and 3 to update in the same way?

 

{
"fields": {
"customfield_10923": [{ "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:{{issue.parent.customfield_10923.get(0).id}}"
}]
}
}

 

Then also, the issue link is now to the Parent that I originally linked, how can I write automation to copy the link to the newly created subtask and delete the link from the parent task?

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.
February 22, 2023

Then also, the issue link is now to the Parent that I originally linked, how can I write automation to copy the link to the newly created subtask and delete the link from the parent task?

Can you provide sample data/issue keys to illustrate this scenario? I'm a little lost on what you're referring to with the various uses of "link" in that sentence.

 

The native Assets functionality in Jira is part of the Jira Service Management product. Your post is tagged as a Work Management topic. Are you linking to Assets where that is the native Assets for JSM, or is Assets a custom field/issue type that you have added to your instance?

Karen Kelly
Contributor
February 22, 2023

No problem, e.g. If I link ARBBLOTTER-112 to the parent ticket POSKEEPER-835 it creates a Linked issue link between the 2 and creates a sub task in POSKEEPER-835 but the subtask does not show a linked issue to ARBBLOTTER-112. I just want to show the link on this ticket as well. I am able to get the actual key to display in a text field called Issue Key (TXT) but not in the Linked issue field

 

Screenshot 2023-02-22 at 21.31.18.png

Karen Kelly
Contributor
February 23, 2023

@Trudy Claspill I found the answers! You need to link to the cloned issue after it is created using: 

Screenshot 2023-02-23 at 10.13.34.png

 

And then I delete the link from the parent issue right at the end using:

Screenshot 2023-02-23 at 10.13.34.png

 

I also managed to get all the asset linked field values to come across using Json, so everything works now

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2023

Hi Karen,

I don't think I am completely following you. Can you give a step by step of what is happening and what you want it to do? 

Suggest an answer

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

Atlassian Community Events