Automatically changing the 'incident state' when a comment is added

m_ahmedmod
Giga Contributor

I'd like to change the state of an incident when it is updated by a caller.

If an incident requires additional information from a caller the analyst would change the 'incident state' to "Awaiting User Info" (4). I would like to configure ServiceNow so that if the customer adds a new comment it would switch the 'incident state' to "Active" (2).

What would be the best way to go about doing this?
I was thinking an 'after' 'update' business rule:

Condition: current.incident_state == 4 && current.comments.changes()

Script:
current.incident_state = 2;

But as it doesn't work I'm thinking there's something wrong with it.

Thank you.

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

Try a 'before' business rule instead.


View solution in original post

6 REPLIES 6

Mark Stanger
Giga Sage

Try a 'before' business rule instead.


Looks like it was as easy as that, thanks Mark.

'Before' 'update' business rule:

Condition: previous.incident_state == 4 && current.comments.changes()

Script:
current.incident_state = 2;

Thanks again.


lawrence_eng
Administrator
Administrator

Hi, it looks like Mark answered your question. If so, would you mind clicking "Mark this as Answered " at the bottom of your post?

Thanks!
-Lawrence


Hi,



I have made additional comments mandatory when state is awaiting user info.


So even when admin adding commnts state is changing to active.



I need a script when only user add comment and state changes to active