Create Automation To Clone Ticket To Another Project Based On User Input Value

AB October 13, 2023

I am attempting to create an automation that can triggered from the actions button in a ticket.

When the action is triggered the user chooses from a list of Project Keys. That value is then loaded into a variable like {{userinput.key}}.

The ticket is then cloned into the chosen project and the sprint and assignee values are cleared.

We are trying to create this because our team forgets to clear the assignee and sprint values before cloneing it to a different project and it causes issues in the new project.

 

So far I have created the below automation but it keeps failing. I added the userinput.key value to the outwardissue value in the more options section but no luck.

Screenshot 2023-10-13 at 2.06.12 PM.png

3 answers

1 accepted

2 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.
October 13, 2023

Hello @AB 

Do I understand correctly that you are attempting to let the user select the destination Project for the issue cloning process?

If so, I don't believe that is possible.

Notice the Clone Issue action has a selection list at the top for selecting the project where you want the issue created. That field does not accept a smart value as input.

And you can't use Advanced Editing to change the project in which an issue exists.

And you can't move an issue from one project to another through an Automation rule.

If I have not correctly understood your intention, please try restating your problem, and also tell us exactly how the results of this automation rule are not matching your desired outcome. 

AB October 13, 2023

Yes we want the user to select a project from the list. I figured that was the case just wanted to confirm. Thanks

1 vote
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2023

@AB -

I am glad that @Trudy Claspill was able to assist you and answered your ask.  Here is a link on how to properly debug your automation rule in your env in case you are not aware of -

https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/

You can always add "Log action" action to assist your debugging process.  I have used it all the time when troubleshooting the automation rule issues.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

0 votes
Luka Hummel - codefortynine
Atlassian Partner
October 16, 2023

Hi @AB

I think @Trudy Claspill is right that this isn't possible with a default Jira Automation, but if you are willing to use a third-party app, you could try to achieve this with Deep Clone for Jira.

You can use a Jira Automation to make a call to the Deep Clone REST API and define the target through a user input smart value. Be aware that the Deep Clone REST API needs a project ID and doesn't accept project keys. You can add the project ID as a substring to your dropdown options like "KEY (10000)" and then use a smart value like below in the REST API call:


"projectId": "{{userInputs.myprojectid.substringBetween("(",")")"

Suggest an answer

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

Atlassian Community Events