- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 08:00 PM
I have a different set of SLAs for assignment groups. For this particular scenario, when the assignment group changes and the response SLA has already been met previously, we do not want the response SLA to start again. How can I achieve this? I have had a play around with the SLA definition filters and cannot find the right combination.
Many thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 11:00 PM
Hi @HP8 ,
There is no script needed to obtain a solution here. You can just ensure your pause SLA is set correct, so the response SLA will pause until resolution. When SLA is paused, the counter has stopped and simultaneously block for starting a new response SLA.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 09:32 PM
Hi @HP8 ,
You can create a new "Stop SLA" Business Rule to run when the assignment group changes on the record.
Here are the steps you can follow:
Navigate to Business Rules > New.
Set the Name to "Stop SLA on Assignment Group Change".
In the Advanced tab, set the Table to the table where you want to stop the SLA (e.g. Change Request).
In the When to Run section, select "Before" and "Update".
In the Advanced section, add the following filter condition to check if the assignment group has changed:
current.assignment_group.changes() && current.assignment_group.changes().length > 0
6. In the Advanced section, add the following script to cancel the running SLA if the response SLA has already been met:
// Get the response SLA and check if it has already been met
var responseSLA = new GlideRecord('task_sla');
responseSLA.addQuery('task', current.sys_id);
responseSLA.addQuery('stage', 'response');
responseSLA.query();
if (responseSLA.next() && responseSLA.getValue('sla_state') === 'met') {
// Cancel the running SLA for the response stage
var sla = new GlideRecord('task_sla');
sla.addQuery('task', current.sys_id);
sla.addQuery('stage', 'response');
sla.addQuery('sla_state', 'in_progress');
sla.query();
if (sla.next()) {
sla.setValue('sla_state', 'cancelled');
sla.update();
}
}
If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the ✅Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.
Thank you!
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 01:19 PM
Thanks! I'm sure this method will work however I have opted in to drill down into the condition filters manually which has worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2023 11:00 PM
Hi @HP8 ,
There is no script needed to obtain a solution here. You can just ensure your pause SLA is set correct, so the response SLA will pause until resolution. When SLA is paused, the counter has stopped and simultaneously block for starting a new response SLA.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 01:19 PM
Thanks for this. I have played around further with the condition filters on the SLA definition and I have got it working the way I need.