Automation Clone - Custom Fields are not cloning
Asked by Heidi Gibson:

Automation rule created:

1. When new issue is created on Jira Service Management Board

2. Clone issue to another Project - clone same issue type as trigger (cloning a story) - both projects have stories enabled.

---\> Issue to copy value from trigger issue

---\> custom field name applied

3. Link back to trigger issue

Audit log shows that it was successful but when checking the newly created story, the field did not copy over.


Answers:
author: Rilwan Ahmed
body: Hi [@Heidi Gibson](/t5/user/viewprofilepage/user-id/4766877) ,

Welcome to the community. To know more about the issue, please let me know

1. In the automation rule, have you selected "Copy **\<Custom field\>** from **Current issue"**?
2. Is the custom field enabled in view screen on the **project B** issue type ? You can check it from **project B --\>** project settings --\> Issues --\> Screens  
   Check the View screen attached for the Issue type of **project B**
3. Share the screenshot of the rule "**Then** " section. It looks like the attached screenshot  

   ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/186833iF33C287AD02E24ED/image-dimensions/174x108?v=v2 "image.png")

comments: author: Heidi Gibson
body: 1. No, custom field from **Trigger issue**   
2. I associated the custom field with ALL screens - triple checked to make sure it was enabled![Screen Shot 2022-03-08 at 8.53.27 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/186935iD12FDB101EE729FE/image-size/large?v=v2&px=999 "Screen Shot 2022-03-08 at 8.53.27 AM.png")


author: Rilwan Ahmed
body: Hi [@Heidi Gibson](/t5/user/viewprofilepage/user-id/4766877)

1. Does the parent ticketreally has the value for "2022 portfolio Name" field ?
2. Create clone of the issue in same project using "Clone" option from the ticket and see if the cloned ticket has the value or not
3. Check if there are any **automation rules** or**workflow post functions** to clear the field vlaues in the Project B isue type.


author: Heidi Gibson
body: 1. Yes

2. Cloned in same project using clone - values still present

3. No automation rules other than to clone the request to project B. Not sure where to check for post functions, but I checked the project workflows and I don't see anything clearing the field values - all generic demo WF's from setup![Screen Shot 2022-03-09 at 1.42.52 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/187095i1E05DAD4A2408755/image-size/large?v=v2&px=999 "Screen Shot 2022-03-09 at 1.42.52 AM.png")


author: Heidi Gibson
body: The intake form is using Proforma forms, do I have to assign the smart value on clone?


author: Rilwan Ahmed
body: [@Heidi Gibson](/t5/user/viewprofilepage/user-id/4766877)   
I dont know about proforma forms.

Regarding workflow post functions,

1. Go to Admin Settings --\> Issues -- \> Workflows
2. Edit the **Jira Workflow(jira)** (assuming it is assigned to your projectB story)
3. Switch to diagram mode --\>Click on "Create transition"   
   A side window will pop-up and click on**Post functions**
4. Check if there is any Post function clearing the field values
5. Click **Discard** if no changes made OR Click **Publish** if changes made.


author: Heidi Gibson
body: I see what you were talking about, but I don't see any post functions on the "create transition" that is showing clear fields. I created a post function to set the value, and saw what it would look like, so I checked the other workflow too, nothing says clear.![Screen Shot 2022-03-09 at 12.16.54 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/187272iF628CE08DDEC71AC/image-size/large?v=v2&px=999 "Screen Shot 2022-03-09 at 12.16.54 PM.png")


author: Rilwan Ahmed
body: Hi [@Heidi Gibson](/t5/user/viewprofilepage/user-id/4766877) ,

The last suggestion I can provide is, delete the automation rule. Recreate it.


author: Laura Campbell _Seibert Media_
body: [@Heidi Gibson](/t5/user/viewprofilepage/user-id/4766877) You mentioned getting data from ProForma; have you looked into the documentation from ProForma?

"accessing form data directly using Automation for Jira is not officially supported and there are currently some significant limitations.": <https://docs.thinktilt.com/proforma/Jira-Automation-(Cloud).1571291510.html>

The documentation explains some work arounds.


author: Curt Holley
body: What happens if you remove the 2022 Portfolio name configuration from the rule? As it should copy it over regardless as part of the Clone issue action.

comments: author: Heidi Gibson
body: It doesn't copy anything over, remains blank. I tried changing the clone action to a create issue action and same result.  

I tried JSON, smart values, everything I can think of all day. I found this: <https://www.atlassian.com/software/jira/automation-template-library#/rule/1357384>

and it updated the fields, walked away, came back and tested again and it started failing again.


author: John Funk
body: Hi Heidi - Welcome to the Atlassian Community!

Check the Context for each of the custom fields to be sure that they include the project (and/or issue type) for the new project you are trying to create the issue in.

comments: author: Heidi Gibson
body: I checked the context and it's Global \& Any issue

![Screen Shot 2022-03-08 at 9.13.32 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/186947i8273605DD6BE9273/image-size/large?v=v2&px=999 "Screen Shot 2022-03-08 at 9.13.32 AM.png")


Tags: automation

cloud