if change request service or ci contains uat/dr/dev then risk should be low regardless

Carol2
Tera Contributor
Hi, 
 
Please help with the below code, A user has an ask to set all NonProd and DR change request - "normal" risk to a low regardless of the risk assessment that is completed. Here is the code changes but for some reason the workflow script doesn't work.
 
if (workflow.scratchpad.ProdDR == false) {
workflow.info("NewRiskCheck IfRisk NonPROD ONLY Fired");
current.setValue('risk', 4);
} else if (riskvalue < current.risk) {
workflow.info("NewRiskCheck IfRisk PROD/DR Fired");
current.setValue('risk', riskvalue);
}
1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Carol2 

 

Yesterday, I replied to same question , how do you are identify a change for non prod or DR? You can use that in risk conditions.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************