- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2016 12:32 PM
Requirement is to have a new 30 min response SLA created whenever the assignment group changes on the incident. The previous should get closed and the new one should be created. How to design SLA definition to achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2016 09:14 AM
A small correction. Instead of a client script, I am using a BR instead.
So here is the complete code:
STEP 1: Create following new fields on Incident table:
- 'Response SLA State' (u_response_sla_state) string field.
- 'Trigger Group' (u_trigger_group) reference field to groups.
STEP 2: Create Response SLA definition as below:
STEP 3: Create BEFORE UPDATE business rule on incident table as below:
Code:
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
current.u_trigger_group = previous.assignment_group;
current.state = 1;
var gr = new GlideRecord("task_sla");
gr.addQuery("task", current.sys_id);
gr.addQuery("sla", "<sys_id of the SLA Definition record above>");
gr.addQuery("stage","NOT IN","cancelled,completed");
gr.query();
if (gr.next()) {
current.u_response_sla_state = 'complete';
} else {
current.u_response_sla_state = 'create';
}
}
STEP 4: Create BEFORE INSERT/UPDATE business rule on task_sla table as below:
Code:
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
var task_id = current.task;
var gr = new GlideRecord("incident");
gr.get(task_id);
gr.u_response_sla_state = 'create';
gr.update();
}
This should make it work.
- Hardik Vora
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2016 12:45 PM
HI Hardik
do the following
Go To the SLA table and create a new SLA record. Fill all other required details
In the start condition put the condition as 'assignment group changes' and save the record
now whenever you will change the assignment group a new SLA/OLA context will be added to the incident
--Harsh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 06:56 AM
Can you show me a screenshot of where you are able to choose "assignment group changes" in SLA's. That is not something I have seen supported on SLA's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2016 10:57 PM
Hi Ryan,
That is not on SLA form , rather on Incident or catalog task form. When assignmnet grp chnages on form, then we can trigger SLA to start or stop using BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2016 12:45 PM