- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 07:16 AM - edited 11-02-2022 07:17 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 07:29 AM - edited 11-02-2022 07:30 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 07:29 AM - edited 11-02-2022 07:30 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 03:15 AM
@Younes Elhamss were you able to achieve this?
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:51 AM
Amazing!! Thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 07:29 AM
Use of a Business Rule is one way. See examples here:
The one named "Caller Close" is a good starting point to copy. Modify the 'Condition':
"current.caller_id == gs.getUserID() && (current.incident_state.changesTo(IncidentState.RESOLVED) || current.incident_state.changesTo(IncidentState.CLOSED) || current.incident_state.changesTo(IncidentState.CANCELED))"
and use just "(current.incident_state.changesTo(IncidentState.RESOLVED) "
and in the script, use logic:
current.assigned_to = current.caller_id;
that one line is enough.