Trying to set up an automation in which a subtask is cloned and added as a task to another board

Jordan Wolman January 31, 2023

I have created an automation that is manually triggered in which a subtask is cloned, added to a different proejct as a task, and then linked to the trigger issue (subtask). When I run this rule I get a message that the issue could not be cloned and moved. Any idea how to get this to work? 

Screen Shot 2023-01-31 at 1.26.30 PM.png

2 answers

1 accepted

1 vote
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.
January 31, 2023

Hello @Jordan Wolman 

What are the details of your Clone Issue action?

What type of issue have you specified in that Action?

Can that type of issue be created in the Marketing Internal project through the Create Issue dialog?

Jordan Wolman February 1, 2023

Hi @Trudy Claspill 

 

Please see the clone issue action screenshot below. I've instructed this subtask to be cloned, as a task, to the Marketing Project board (which does all for tasks as issue types). Can you clarify what you mean by the Create Issue dialog? 

 

Screen Shot 2023-01-31 at 4.53.42 PM.png

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 1, 2023

By "Create Issue dialog" I mean the pop-up you would get in the UI if you click the Create button in the menu bar.

Also, on the Rule Details page for the automation rule, what is the Actor field set to?

Jordan Wolman February 1, 2023

Yes, this type of issue can be created in the "create issue dialog" for this project. 

 

In the Actor field for the rule: it currently says "automation for jira"

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 1, 2023

Can you check the Permission Scheme for the destination project and make sure that the Browse Projects and Create Issue permissions are allocated to ...?

  • Project Role (atlassian-addons-project-access)
Jordan Wolman February 1, 2023

This is a team-managed project so I am looking at access which is set to Limited "Anyone with access to the "stridefunding" Jira site can search for, view, and comment on this project's issues. Only people you add to the project can create and edit its issues." - the people I want to be able to run this rule are added to this project and have a role of "Member". 

 

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 1, 2023

Can you change the Rule Actor to yourself and see if the rule works then, just as a test?

Jordan Wolman February 1, 2023

I just tried this and got the same error

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 1, 2023

The error message you got indicates that an issue of a particular type can't be created in a particular project, and provides the IDs of each.

project ID = 10054

issue type ID = 10158

Can you navigate to the destination project to confirm these are the correct IDs?

You said this was a team managed project, so go to that project and select Project Settings.

If you then hover over the Toolchain option, the project ID will display in the URL shown at the bottom of the browser.

Screen Shot 2023-02-01 at 12.11.36 PM.png

If you then click on Issue Types, and then hover over the Task issue type you will likewise see its ID in the URL at the bottom of the browser.

Screen Shot 2023-02-01 at 12.12.56 PM.png

 

Check if those IDs match the IDs in the error message.

Jordan Wolman February 1, 2023

hi Trudy, 

 

Thanks for sticking this out and helping me try to resolve. It is a team managed software project and I do not see Toolchain when I click project settings (see image) - is there somewhere else I can look? 

Screen Shot 2023-02-01 at 4.07.04 PM.png

 


As far as task goes, I am seeing 10115 which is not a match - is there a way to adjust this in the automation rule? 

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 1, 2023

You can also get the project ID using this REST API call

/rest/api/3/project/{projectIdOrKey}

You can run that in a browser tab. Put your Jira URL in front of it and use the Project Key to replace {projectIdOrKey}. The output will include the project ID.

For the issue type ID, if what you see in the error message doesn't match the ID for the Task issue type in the destination project, that indicates that the Issue Type selected in the Clone action in the Rule is not the actual Issue Type used in the destination project.

If the selection field in the Rule gave you only one option named Task, I'm not sure how to fix that. I'll do some research and get back to you.

Jordan Wolman February 1, 2023

When I put that at the end of the URL and replace {projectIdORKey} with the key (MI) I get a 400 Bad Request Message. 

 

Please let me know if you figure out how to have multiple Task options so I can use the right ID task. 

Jordan Wolman February 1, 2023

Is it possible that Cloning a ticket from a work management board to be generated as a task on another project that is a software project is the issue? 

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 1, 2023

To be clear, to use the REST API in the browser it would look like this:

https://yourCompany.atlassian.net/rest/api/3/project/MI

When I said your URL, I meant just the part from "https" through "atlassian.net"

You said you are cloning an issue from a work management project to software project.

We've identified that your software project is Team Managed? Is you work management project Team Managed or Company Managed?

In the Clone action could you possible have selected the Issue Type and then changed your selection for the Project? Can you try deleting that step and re-adding it? Makie sure that you select the destination project and then select the Issue Type.

Jordan Wolman February 2, 2023

Hi Trudy, 

 

The project ID is a match: 10054 but the Issue ID is not: should be 10115  vs. what the error message is saying (10158). 

 

Both projects are team managed with one being a work management project and one being a software project.   

 

I will try to to delete the Clone step and redo - selecting the project first. 

Jordan Wolman February 2, 2023

That worked! Thank you so much! 

Like John Funk likes this
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.
January 31, 2023

Hi Jordan,

First, there is no "Move" function in Automation for Jira. You can clone the issue and then the issue will show on whatever board that is met by the board's filter. 

Second, the error you are getting says that it can't Clone the issue because the actor of the rule doesn't have permission to create an issue in the target project. Check the permission scheme for the target project to see who has create permissions for that. 

Jordan Wolman February 1, 2023

Hi @John Funk

 

1) is there a filter I need to create for this to work? Or are you saying what I place in the automation should work if not for your second point. 

2) I ran this rule and I do have permission to create issues in the target board so I'm unsure why we would receive that message. 

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 1, 2023

If you are using the clone function, what is your parent for the clone? You can't use the same parent from another project from the original sub-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 1, 2023

He is cloning it to a different issue type which is not a subtask.

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 2, 2023

Sorry, missed that. But that also should not cause the error. 

Can you create an issue using the Create button for that project and issue type (Task)? 

Are there any extra Validators on the Create transition in the workflow for Task for that project? 

Suggest an answer

Log in or Sign up to answer