Add a new risk condition: "Insufficient lead time - Normal Change" so that if lead time of 7 days is not met for Normal change requests, Risk should be set as High (NOT VERY HIGH), Impact should be left alone for changes where Type is Normal Change

Govindarajan
Mega Contributor

hi i am working in itsm stimulator, pls give solution for below task .

Add a new risk condition: "Insufficient lead time - Normal Change" so that if lead time of 7 days is not met for Normal change requestsRisk should be set as High (NOT VERY HIGH)Impact should be left alone for changes where Type is Normal Change

1 ACCEPTED SOLUTION

Pranay Mahajan
Tera Contributor

Configure below Risk conditions.

Mark helpful if this satisfies..!!

find_real_file.png

 

 

View solution in original post

28 REPLIES 28

Naveen20
ServiceNow Employee
ServiceNow Employee

Please create as below.

find_real_file.png

Script

answer = false;
var leadTime = 0;
if (current.type == 'normal' && current.start_date && current.end_date) {
leadTime = gs.dateDiff(current.start_date.getDisplayValue(), current.end_date.getDisplayValue(), true);
if (leadTime < 7 * 86400)
answer = true;
}

i am not getting it rightly. its not validating .

What is the issue you are facing. Can you check by commenting line 3.

Hello, Govindarajan,

 

Please update last condition, needs to change:

  1. Model is Normal, instead they have mentioned as Type.

Thanks,

Nithin Ravichandran.