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

KaChan
Giga Contributor

find_real_file.pngfind_real_file.pngfind_real_file.pngfind_real_file.png

Here is an SLA difinition.
The most strange when i creating even NEW INC or RITM, and start clicking Repair SLA: it recounts 4-5 times correctly, (instead 9 sec it could be 8 sec after repair), and at 5-6 time, it deletes and that's all. Then if click Repair SLA it will not appear ever. Stange behaviour...

So if Assigned to is NOT empty - the SLA should cancel, according to your Start conditions.

 

BTW - your start conditions should be true through the life of the ticket, except when Stop is true. So if Start conditions Active is true, Stop should contain Active is false.

Archi
Kilo Expert

Hi KaChan!

You wrote 'Found "scripts/SLARepairClient.js" '.

Where you found this script?

In which table or anywhere else?

Answer pls.

Thanks.