- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2014 03:26 AM
Morning all,
Got a question which I don't think is unique but I can't seem to get this working the way I want it.
Background info:
When a ticket is logged, an SLA is fired (This is normal for all of us and this will not change unless the priority changes). Now, certain departments in the IT department have different SLA's.
What I am trying to create is this:
- The current SLA will become the primary business SLA which most departments will use and can't be placed into a cancelled state if reassigned to a department with a different SLA
- I need a second SLA to start when the ticket is transferred to their queue (and if transferred out their queue pauses their SLA and not cancel it in-case it is transferred back)
At the moment I have been able to build SLA's and have them working with no problems when the ticket is assigned to them but I can't figure out how to stop the SLA from being cancelled when transferred and have the primary SLA continue regardless of being reassigned.
Thanks for all help.
Regards,
Lucien
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2014 04:23 AM
from memory, the first SLA cancels as soon as the assignment group changes
I did some work on this here to allow switching between teams and to maintain the teams own SLA's (different local teams, different global teams, all with different SLA's / OLA's)
It did a few extra bits that we were looking at too, but to stop the SLA change cancelling, I had to update the ScriptInclide TaskSLAController to pause instead of Cancel
For reference, we are on Calgary,
You can look at what I did, but it is an OOB scriptinclude so you may not feel you can modify it as it may have future implications.
It could stop future updates from happening, or if you make the relevant update (I cannot remember where), which will then allow this ScriptInclude to be updated with new releases / patches, you may find the "pause" functionality is removed
While I did all this work in DEV and in TEST, we never went live with it. The pressing need that made me investigate and develop this update went away and it is now an update set that sits in an XML file on my machine
but in the above script include, the following section (line 274)
_stopCancel: function(taskSLA) {
var taskSLAgr = taskSLA.getGlideRecord();
var slac = this._newSLACondition(taskSLAgr.sla, this.taskGR);
if (slac.complete() || slac.reattach()) {
taskSLA.updateState(TaskSLA.STATE_COMPLETED);
// Re-evaluate conditions for this specific taskSLA,
// to allow a 'Complete and reapply' mode of operation
if (slac.reattach()) {
var newTaskSLA = SelfCleaningMutex.enterCriticalSection(this.MUTEX_NEW + this.taskGR.sys_id, this,
this._checkNewSLA, taskSLAgr.sla.getRefRecord());
// and just in case it should need to transition to Paused state immediately upon creation
this._pauseUnpause(newTaskSLA);
}
return true; // state was changed
}
else if (slac.cancel()) {
taskSLA.updateState(TaskSLA.STATE_CANCELLED);
return true; // state was changed
}
},
has code amended to this
_stopCancel: function(taskSLA) {
var taskSLAgr = taskSLA.getGlideRecord();
var slac = this._newSLACondition(taskSLAgr.sla, this.taskGR);
if (slac.complete() || slac.reattach()) {
taskSLA.updateState(TaskSLA.STATE_COMPLETED);
// Re-evaluate conditions for this specific taskSLA,
// to allow a 'Complete and reapply' mode of operation
if (slac.reattach()) {
var newTaskSLA = SelfCleaningMutex.enterCriticalSection(this.MUTEX_NEW + this.taskGR.sys_id, this,
this._checkNewSLA, taskSLAgr.sla.getRefRecord());
// and just in case it should need to transition to Paused state immediately upon creation
this._pauseUnpause(newTaskSLA);
}
return true; // state was changed
}
// Jules this is the area that needs looking at
// If you disable this else if, it will pause, however, changing the SLA does not cancel the old one.
// Need to look at team somehow.
else if (slac.pause()) {
taskSLA.updateState(TaskSLA.STATE_PAUSED);
return true;
}
else if (slac.cancel()) {
taskSLA.updateState(TaskSLA.STATE_CANCELLED);
return true; // state was changed
}
else
return false;
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2014 06:03 AM
Hi Julian Poyntz,
Thanks for this code, we have placed it into our test environment and am busy testing it but it is looking good.
You have saved me LOADS of time. Much appreciated.
Will let you know what happens.
Regards,
Lucien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2015 02:36 AM
After a few months testing, testing and re-testing it looks promising that we will put this in place.
Thank you for your help on this.
Regards,
Lucien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2015 02:42 AM
Glad you could make use of it
Cheers