Auto create a problem if Major incident is resolved

sattar3
Tera Contributor

Hello Everybody,

 

The requirement is when a Major incident is resolved then automatically a Problem ticket.

 

I created a BR to implement this but it is working sometime and sometimes not working.

Please check the below script and let me know if any changes needed.

 

I installed the Major Incident Management Plugin also.

One more thing is do i need to use Major Incident Management application scope or Global scope also fine?

 

BR Script: After Update 

(function executeRule(current, previous /*null when async*/) {

    // Short Description, Problem Manager Assignment Group, and Responsible IT Organization to populate with the corresponding information from the Incident Record.  
    var problemGR = new GlideRecord('problem');
        problemGR.initialize();
        problemGR.short_description = "RCA for Major Incident " + current.number;
        problemGR.description=current.close_notes;
        problemGR.assignment_group=current.assignment_group;
        problemGR.cmdb_ci=current.cmdb_ci;
        problemGR.insert();
        current.setValue('problem_id', problemGR.number);
        gs.addInfoMessage("Problem " + problemGR.number + " created from this Major Incident.");

})(current, previous);

Thanks,
Sattar

 

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @sattar3 

It is OOTB available, check this flow:

 

DrAtulGLNG_0-1765520935439.png

 

*************************************************************************************************************
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/dratulgrover [ Connect for 1-1 Session]

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

AndersBGS
Tera Patron
Tera Patron

Hi @sattar3 ,

 

Why? This is in general not best practice according to ITIL? The reason that I'm stating this is, that a problem record should be open only if an incident is solved by a workaround either without a permanent solution, or where a permanent solution is differed due to other reason. 

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/