notify the caller user of the source incident when the change is closed

takagiko
Tera Guru

I have created a change based on an incident and I want to automatically notify the caller user of the source incident when the change is closed.

How can I do this?

1 ACCEPTED SOLUTION

Ohh then you would require to use a business rule that whenever the change is closed fire an event

So you need to create an event in the event registry

and in the bsuienss rule please use the below script

var gr= new GlideRecord('incident');
gr.addQuery('change_request',current.sys_id);
gr.query();
if(gr.next())
{
var caller=gr.caller_id;
}

gs.eventQueue('eventname',gr,gr.caller_id);

And in the notification check the box send to event parm1

Please mark answer correct/helpful based on impact

View solution in original post

8 REPLIES 8

Sourabh26
Giga Guru

Hi,

 

There are multiple ways to have this on place.

I would suggest to create a field on Incident form to have the related change request number in it.

Later on you just need to create a notification on Incident table, triggered on Record Updated and add the condition to include if change is closed then the notification will be triggered.

 

Select user/caller which receives notification and add the related details in the notification as per the need.

 

Mark this as Correct/Helpful in case this helps you in anyways.

 

Regards,

Sourabh

Sulabh Garg
Mega Sage
Mega Sage

Hello

You may create Email notification on closure of change and check if you have associated Incident on change and then you can trigger the notification to the caller of Incident.

Please Mark ✅ Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Hi, Thank you for your reply.

I could create a notification on closure of change, but cannot get the source incident in the notification definition. Do I need to write some scripts?

Regards,

Saurav11
Kilo Patron
Kilo Patron

Hello,

Considering you have create the notification on Change request table:-

Create a notification email script

find_real_file.png

Script Screenshot

find_real_file.png

Script:-

var gr= new GlideRecord('incident');
gr.addQuery('change_request',current.sys_id);
gr.query();
if(gr.next())
{
template.print(gr.number);
}

Then call the email script in the notification as below considering my mail script name is test:-

${mail_script:test}

Screenshot

find_real_file.png

Please mark answer correct/helpful based on impact