Custom field disappears after automation rule runs
Asked by Nick Danielson:

I have a custom field I created and added to the Issue View called 'Closed Date/Time'. I also created an automation rule where once the Issue is transitioned to 'Closed', the 'Closed Date/Time' field is edited using {{now}}.

With that, after creating a new issue and viewing it in the issue view, I see my custom field called 'Closed Date/Time' and it is populated with nothing.

![fieldshown.jpg](/t5/image/serverpage/image-id/342000iA360B9D2E3806F80/image-size/large?v=v2&px=999 "fieldshown.jpg")

The issue is when I transition the issue to 'Closed'; the 'Closed Date/Time' field just disappears from the issue view.

![fieldgone.jpg](/t5/image/serverpage/image-id/342001iA910334635737E05/image-size/large?v=v2&px=999 "fieldgone.jpg")

I looked at my automation's audit log and it gives me an Unknown fields during edit error.

![auditlog.jpg](/t5/image/serverpage/image-id/342002i043EF643B5F7F79B/image-size/large?v=v2&px=999 "auditlog.jpg")

I then used the find your field option in the issue itself and it found my field with no issues.

![findfield.jpg](/t5/image/serverpage/image-id/341999i7CA53C16B9EC3D0E/image-size/large?v=v2&px=999 "findfield.jpg")

Another thing worth mentioning is when I set the automation to trigger on when the issue is transitioned to 'Resolved' instead of 'Closed', the field populates as expected and is visible.

Does anyone have any advice on how to get this to work?


Answers:
author: Susan Waldrip
body: Hi [@Nick Danielson](/t5/user/viewprofilepage/user-id/5569284) , if I understand your problem correctly, I did something similar to this with a custom field called Complete Date and a post-function on the workflow transition from Resolved to Closed:

![help3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/342053iEF3887D974AB57DB/image-size/large?v=v2&px=999 "help3.jpg")

When the issue transitions from resolved status to Closed status, the field automatically updates with the current date per the code. I also made the field view only for audit purposes. You might try this if it sounds like what you're looking for.

comments: author: Nick Danielson
body: Thank you [@Susan Waldrip](/t5/user/viewprofilepage/user-id/5343063) , I will take a look at this and see if I can't figure something out!


author: Alicia Peebles
body: Hi [@Nick Danielson](/t5/user/viewprofilepage/user-id/5569284) !

I have a couple of ideas to try:

* What is the trigger you are using for the Automation rule? That could be why it is working for Resolved and not Closed. Make sure you have it set for both Resolved and Closed transitions. Sounds like you are using Resolved, but maybe the action of Closing doesn't set the resolution as Resolved? I have seen that missed in the post functions of some workflows.
* Second, for the automation to run, the field has to be available in the Edit schema. Double check the field configuration for the edit functionality to ensure the field is in that part of the schema.

Good Luck! Let me know if these ideas help!

Alicia

comments: author: Nick Danielson
body: Hi [@Alicia Peebles](/t5/user/viewprofilepage/user-id/5415758) !

Thank you for your response.

I'm using the below trigger. It's a very simple automation so that lends to my confusion.

![autotrigger.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/342223i1F1A1ADDF7623B39/image-size/large?v=v2&px=999 "autotrigger.jpg")

I'm also seeing the 'Closed Date/Time' field appear in the edit issue action of the automation.

![editissue.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/342224iD0312D852341B252/image-size/large?v=v2&px=999 "editissue.jpg")

Do I need to configure the workflow so the transition to Closed includes a post function? If so, do you know what that might be?


Tags: cloud

jira-service-management

jira-service-management-cloud