Populate Closed_At and Closed_By

Bel Ngiam
Kilo Contributor

I found that when the incident ticket is closed by user/caller other than system, the closed_at and closed_by fields are not being populated. Found a solution to write a UI action to update these fields. However, I need to update all older records as well. Does anyone have a script to do that? Thanks! 

1 ACCEPTED SOLUTION

siva_
Giga Guru

Hello Bel, 

Please find the script inline 

UI ACTION CODE : 

Also inactivate the record accordingly using 

current.active = false;

current.closed_at = gs.nowDateTime();

current.closed_by = gs.getUserID();

current.update();

action.setRedirectURL(current);

 

Should not be client callable 

 

 

View solution in original post

2 REPLIES 2

siva_
Giga Guru

Hello Bel, 

Please find the script inline 

UI ACTION CODE : 

Also inactivate the record accordingly using 

current.active = false;

current.closed_at = gs.nowDateTime();

current.closed_by = gs.getUserID();

current.update();

action.setRedirectURL(current);

 

Should not be client callable 

 

 

Omkar Mone
Mega Sage

Hi 

There is a business rule "mark_closed" that takes care of it. I dont see any issue here. If you want to update older records, You need to use the same business rule in background script.

 

Regards,

 

Omkar Mone.

www.dxsherpa.com