The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to find where a field is being updated?

porknan
Kilo Contributor


Hi,

I'm trying to find out where/when a certain field is being updated.

Its called 'Closed_at' and it logs a datetime when the end user closes an Incident.

I just cannot seem to find out where/when its being updated.

I've had this issue a few times and I am hoping someone will be able to tell me a way of being able to do this in the future   - possibly a "FIND" or simular.

Why am I looking for this field?ticket.JPG

As stated above, when the incident is closed by the end user, this field is updated with a datetime BUT if the incident is reopened then closed again, it does not update with a new datetime, it instead keeps the original datetime which is of course incorrect.

Thanks in advance.

Stuart

1 ACCEPTED SOLUTION

Hi,



its because this line in above mentions B.rule.


if (current.closed_at.nil())


  current.closed_at = gs.nowDateTime();



remove If condition then it will work fine.



i hope this helps.


View solution in original post

7 REPLIES 7

Rushit Patel2
Tera Guru

Hi,



it is being set by 'mark_closed' business rule on Incident table.



find_real_file.png



so you can see in the image...at line 11 it is checking if closed_at field is not empty then dont do anything. i guess u need to modify that acording to your need.




i hope this helps.



(mark helpfu/correct/like if it helps)




Regards,


Rushit Patel


Hi rushit patel



Thank you for pointing out where this code is.



I dont think that the 'mark_closed' buisness rule is triggered anymore once the ticket has been resolved which i think is the issue here.



Here is a basic flow:



1. User open tickets.


2. Resolver resolves ticket.


3. User accepts resolution and ticket closes.


4. 'Mark_Closed' business rule is run and the 'Closed_at' is populated.



Thats all fine and working as it should.   The issue occurs at when the following happens after :



1. The above ticket gets re-opened.


2. Ticket is then resolved again.



I don't think the 'Mark_closed' rule is run again.


Brad Tilton
ServiceNow Employee
ServiceNow Employee

I think Rushit is probably right, but any time you want to know what is acting on a field you can use the field watcher. Great troubleshooting tool.



Field Watcher - ServiceNow Wiki


Hi Brad, any ideas on how to fix this one?