Change the State of Incident to “In Progress” when user updates work notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2021 10:33 AM
Change the State of Incident to “In Progress” when user updates work notes
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2021 12:57 PM
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>;
}
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 08:54 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2021 03:35 AM
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