Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Repair SLA button deletes some of my SLA

KaChan
Giga Contributor

Hellow community!
There is a button on incident and RITM form that should repair SLA. It work's on target=resolution perfectly, but i've got a response SLA that counts time between the specialist click "New"(create incident or RITM) and "Save" (after incident or RITM been registred) - 20-30 sec always.
When i'm trying to "repair SLA" - this method deletes my "response" SLA away from table! I can't catch why and when! 50%50, sometimes 3-4 click on same incident is OK, and on 5-th SLA deletes.
Got anybody some ideas?

Found "scripts/SLARepairClient.js" - that contains 
'''

repairByFilter: function(table, filter)
{ this.request = new SLARepairClient.Request(table); this.request.filter = filter; this._validateRequest();
'''
If i could't find reason, at least can i use this part of script to add to that UI Action button to filter out all "respose" SLA that this button fixing?

Here is a code of this button

ScriptLoader.getScripts([ '/scripts/SLARepairClient.js' ], function() {});
function repair() {
var slaClient = new SLARepairClient();
slaClient.callback = function(response) {
g_navigation.reloadWindow();
};
slaClient.repairBySysId(g_form.getTableName(), g_form.getUniqueValue());
}

7 REPLIES 7

Michael Fry1
Kilo Patron

Because the conditions are false? since the SLA shouldn't be there it removes it?

KaChan
Giga Contributor

No, becouse the condition of SLA with target=resolution false too. But it marked "cancelled" or something else, and not disappear.

Post screen shots of your SLA definition.

KaChan
Giga Contributor

find_real_file.pngSO That's the SLA that is deleting - can i view a reason why?(somewhere?)