Change the State of Incident to “In Progress” when user updates work notes

Thirumal Reddy2
Kilo Explorer

Change the State of Incident to “In Progress” when user updates work notes

3 REPLIES 3

oharel
Kilo Sage

Who is the user? the caller? the assigned to? 

Anyway, below is an example. Change it to your needs (for instance, current.caller_id to current.assigned_to).

Create an "on before" and "update" business rule with a condition: work notes changes

Then, in the script, add:

if(gs.getUserID() == current.caller_id) {//or current.assigned_to, or just drop this, if it is any user

current.incident_state = <whatever number is the in progress state>;

}

 

find_real_file.png

harel

Hi Oharel,

I want to change the state only if worknotes are added through servicePortal and state should not change when worknotes are added through internal fulfiller portal.

Please help.

 

Best Regards,

Anubha 

I think there are two ways to achieve this:

Either change the widget form logic in the portal (check who's updating the form in the server script and change the state accordingly)

or

in the business rule, add the following in the condition field:

gs.action.getGlideURI().toString().indexOf("api/")  == 0

You have to test that, though, to make sure it is working as expected 🙂

harel