Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Clone Issue during Automation

Fraser Walker September 27, 2022

I have two projects, and I wanted to create a trigger where when I can create an issue in the one, it clones the issue into a specific epic in the other project. I keep getting errors, not sure if they're related to Permissions or something. I'm not an admin for the Project I want to clone into but I do have access to create new tickets.

 

Clone issue
Can not create issue in project/issue type
10294/10007
jira.PNG

1 answer

1 accepted

4 votes
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 27, 2022

Hi @Fraser Walker -- Welcome to the Atlassian Community!

There are several things which could lead to this symptom...

  • Who has permissions to create issues in the destination project, Data Team?
  • Is the issue type you are trying to create available in the Data Team project?
  • What are the types of the source and destination project: company-managed or team-managed?  When trying to create an issue for the other project type, some fields may not be available.
  • Is the issue created also an Epic, or are you creating an epic using fields from another issue type, and so there are missing fields?
  • The Issue Created trigger can occur so fast that the data is not available for next steps.  To slow down the rule and reload the data, it is a good practice to add a Re-fetch action after the Issue Created trigger...and before any other rule steps

Kind regards,
Bill

Fraser Walker September 29, 2022

Hi @Bill Sheboy , thanks for the welcome and thanks for the detailed reply. Bear with me while I try to answer your questions in detail (I'm a little new).

1) Permissions

Permissions in Destination Proj for Create Issue and Clone Issue are Project Role/Application Access (any logged in user). Don't see a Permissions tab in Source Proj > Project Settings.

2) Issue Type

Issue type is just a Task and Tasks are available in Destination project. I just made a test one myself manually.

3) Project Type

Think this is a promising lead. Source is Team Managed, Destination is Company managed. In Destination project settings, Tasks follow "Default Field Config" whereas in Hedgehog I'm sure I've customized task fields before. See picture for Task fields in Source Project.

jira.PNG

I can see all the projects that share Default Field Config for Tasks in the company and they're all company managed projects. If it matters, the Source/Destination projects also have different Columns. Destination is a standard "Backlog/Selected For Development/In Progress/Done"; In Source proj I've customized my Columns.

4) Is issue an Epic. 

I'm only looking to clone Tasks. I would like the Task in Source to be under a different Epic than the cloned Task in Destination. The Epic I want cloned task to be under already exists in Destination Proj.

5) Re Fetch

Thanks for this tip. I've included in my trigger but still getting same errors. I'll keep this in mind for future automation though.

Let me know if I need to clarify anything else,

Fraser 

Like Bill Sheboy likes this
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 29, 2022

Yes, this appears to be the "clone team-managed issue to <anywhere else>" defect, occurring due to the differences in issue types, fields, status values... as shown here: https://jira.atlassian.com/browse/JSWCLOUD-22449

The suggested work-around is to explicitly select the issue type in the clone operation.

Another work-around would be to create the issue instead of clone, and explicitly set each field you need to copy over.  And, I would explicitly set the status or leave it blank.  Another challenge could be if you want to copy components, as they are distinct for each project.

Like # people like this
Fraser Walker October 3, 2022

Explicitly selecting the issue type (Task) fixed the problem. I've even managed to set the Epic Link I want to clone into and the cloning is working exactly as expected. Thank you for your help @Bill Sheboy 

Like Bill Sheboy likes this
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.
October 3, 2022

Awesome!  I am glad to hear that work-around helped. 

Carl Sanders
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!
January 7, 2025

I had the same problem.  Explicitly setting issue type to 'Task' instead of 'Copy from issue' fixed the problem.

Many thanks @Bill Sheboy 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events