USing automationrules in jira need to copy vaues from one project to another while cloning
Asked by mummareddy supriya:

When we clone the ticket from one project to another, we need the values (Issue ID and Project) to be auto populated in the reference project.

Issue ID from parent project should be updated in External Issue ID field.

Project name from parent project should be updated in Requesting Project field.


Answers:
author: Vikrant Yadav
body: Hi [@mummareddy supriya](/t5/user/viewprofilepage/user-id/5263828) You need to create an automation rule for cloning an issue in second project. In action item \>\> Select Clone \>\> In Choose field to set select both the field External Issue ID and Requesting Project

External Issue ID put smart value : **{{issue.key}}**

Requesting Project : **{{issue.project.name}}**

Thanks

comments: author: mummareddy supriya
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) in the same way i created the automation rule .as shown in the attachment.after clone the ticket i'm unable to Find External Issue ID .may i know the reason please![automation1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/328813iF3C668D3655ED276/image-size/large?v=v2&px=999 "automation1.PNG")

In Choose field to set ,i'm unable to find Requesting Project ![requesting.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/328814i8FB06185C07B7074/image-size/large?v=v2&px=999 "requesting.PNG")

After cloned the reference image is attached here ,please find below![cloned.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/328815i1E1839118CDC14B9/image-size/large?v=v2&px=999 "cloned.PNG")

kindly suggest me here.thanks in advance


author: Vikrant Yadav
body: [@mummareddy supriya](/t5/user/viewprofilepage/user-id/5263828) It seems that field is not supported, that's why not showing in this dropdown.

May I know the field type, is it an external plugin field? Field is mapped with the project, visible on edit screen ?


author: mummareddy supriya
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711)The External Issue ID field exists in the parent project.I need to clone it to the another project.This field is present in the parent.Attaching the images here, please guide me.  
.

thanks in advance


author: Vikrant Yadav
body: [@mummareddy supriya](/t5/user/viewprofilepage/user-id/5263828) Try to add this field in EPP project as well.

If field is not visible, you can try to add JSON in Additional field :   

{  
"fields": {  
"customfield_10307": "{{issue.key}}"  
}  
}

Check audit log for error.


author: mummareddy supriya
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) its it possible to get the project url using automation rule instead of project name,if yes can you kindly help me here.Now with you suggestion i'm able to get External issue ID

External Issue ID put smart value : **{{issue.key}}**

Requesting Project : **{{issue.project.name}}**


author: mummareddy supriya
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) can you please suggest me here like how can i get project url instead of project name.

thanks in advance


author: Vikrant Yadav
body: [@mummareddy supriya](/t5/user/viewprofilepage/user-id/5263828) Here is the smartvalue :

project url : {{baseUrl}}/browse/{{project.key}}

issue key url : {{baseUrl}}/browse/{{issue.key}}

Hope it works for you!


author: Clara Belin-Brosseau
body: Hello [@mummareddy supriya](/t5/user/viewprofilepage/user-id/5263828)

If you're seeking for an easier way to **clone issues and map the fields between source and clone** , you can try our [app Elements Copy \& Sync](https://marketplace.atlassian.com/apps/1211111/elements-copy-sync-clone-jira-issues?tab=overview&hosting=cloud?&utm_source=community&utm_medium=answer&utm_campaign=question_2721947&utm_keyword=CS&utm_vendorID=4952) that allows you to clone and sync a full hierarchy of issues with all their content (summary, description, custom fields, comments, attachments, etc).

You can check our guide [here](https://doc.elements-apps.com/copy-and-sync-jira-cloud/create-a-mapping-of-jira-fields-between-two-issues?&utm_source=community&utm_medium=answer&utm_campaign=question_2721947&utm_keyword=CS&utm_vendorID=4952).

![map-reporter-to-assignee-copy-and-sync.png](https://community.atlassian.com/t5/image/serverpage/image-id/336287i44C88AB39B18D940/image-size/large?v=v2&px=999 "map-reporter-to-assignee-copy-and-sync.png")The app is for **free during 30 days** (and it stays free under 10 users).

Kind regards,

Clara


author: Geethanjali Katagani
body: Hi [@mummareddy supriya](/t5/user/viewprofilepage/user-id/5263828) ,

First, you need to get the issue ID in the parent issue and store that issue ID in a text field. If you do not have a text field to store the issue ID, create a new one. To get the issue ID in the parent issue ID field, please use the jira Automation or ScriptRunner plugin.

After obtaining the issue ID, create an automation rule. When an issue is cloned or created, copy the parent issue ID from the cloned or linked issue.

"The project name from the parent project should be updated in the Requesting Project field." This can also be achieved using automations.

Let me know if you have any questions on this.

Regards,   
Geethanjali


Tags: cloud

jira-cloud