UI Action "Close SIR" is not saving time worked to time card

kdelbridge
Tera Expert

I am investigating an issue that involves an issue when an SIR Analyst uses our "Close SIR" UI action button to close a Security Incident, the time worked is not saving to the time card.

 

This is my first go at researching this type of issue.

 

Any ideas where to get started or what the issue might be?

 

This is a custom UI action that we created. It is not OOB.

 

User should be able to click this button to close the Security Incident record and any time worked should save after they input resolution info.

(Ie: if they started working response, if time worked was 2:42 and they started the timer. Completed worked and when click on "Close SIR" if time worked has now clicked off to 7:42 upon completing resolution steps, once record saves, time worked should be 7:42 and no longer 2:42.

 

Currently, the time worked is not capturing that last 5 minutes and still shows 2:42 afterwards.

 

Thanks in advance.

6 REPLIES 6

@kdelbridge 

I believe it's because you might be updating the value via UI page and the form field still shows the earlier value.

what you will have to do is, pass the time worked field from form to UI page and then use that value to update

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @Ankur Bawiskar,

 

Thanks for your reply. 

 

I have modified the script 2 times and each version will save the time worked and any other changes on the record that might exist, but in both cases, when the modal does finally open, it does not stay open long enough to complete the closure information so that info can be submitted and saved.

 

1st script.

kdelbridge_0-1748988214933.png

 

2nd script

kdelbridge_1-1748988333451.png

 

Thoughts on how to still save time worked and any other information that needs saving and keeping that modal open long enough?