Incident priority is removed and then defaults to an automatic choice when worknotes are updated

Kiran_25
Tera Expert

Hi,

 

I have a issue where an incident is auto logged with the correct impact & urgency and the priority is correct however if there are any subsequent updates that are made to the incident via worknotes (these are automated updates), the impact is being wiped out a shortly after it this is updates itself to 1.

 

There are no business rules or client scripts that are affecting this but there is a transform script which prevents this specific type of incident from being logged as 1-critical. All of these are reverting to 1-critical after they've been logged. 

2 REPLIES 2

Aditya Banka2
Tera Guru

Could you paste the transform script here

Hi Aditya
 
Here you go:
 
(function transformRow(source, target, map, log, isUpdate) {

if (source.impact === '1'){
    target.urgency = '1';
} else {
    target.impact = source.impact;
    target.urgency = source.urgency;
}

})(source, target, map, log, action==="update");