Auto -populate "assigned to" field when state is resolved in incident

Younes Elhamss
Tera Contributor

Hey, 

 

I'm a noob and I'm looking for a way to auto populate the assigned to field when the state is set to resolved, and the assigned to field should be the creator of the incident. 

 

Use case:

Person A creates the incident and assigns it to person B to fix something

When B fixes it and clicks resolve, the assigned to should automatically populate A.

 

Is this possible and if so, can you give me a step for step on how to do it? 🙂

 

I hope it makes sense. 

1 ACCEPTED SOLUTION

RaghavSh
Kilo Patron

1. Create a before update business rule on incident table with condition (state changes to resolved).

2. In the script part write:

current.assigned_to = current.caller_id;  // caller_id is the backend name of "affected user" on incident table.

OR

current.assigned_to = current.opened_by;   // if you want to set opened by in assigned to.


Raghav
MVP 2023

View solution in original post

5 REPLIES 5

Bert_c1
Kilo Patron

[re-posting the link, seems just 'copy and paste' doesn't work well]

 

https://[your_instance].service-now.com/sys_script_list.do?sysparm_query=GOTOcollection%3Dincident%5Ewhen%3Dbefore&sysparm_view=