email notification for change request state changes

Mohanapriya1
Kilo Contributor

Hi,

When any change ticket state update happens then it should send notification to assignee and assignment group mail id.

So I am following the OOB "Change request state change notification" notification and given the script as below.

It is generating the notification for all the state changes but only for Authorize state change notification is not sent.

Please help on  this.

var cr = new ChangeRequest(current);
answer = (cr.changesToAssess() || cr.changesToAuthorize() || cr.changesToScheduled() || cr.changesToImplement() || cr.changesToReview() || cr.changesToClosed() || cr.changesToCanceled());

Thanks

1 ACCEPTED SOLUTION

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

Is the BR executed in authorised state? Because it seems the BR is not triggered.

Also this has to be done rightly in Notification. you dont need br for this.


Just create simple notification where condition is states changes and it will tirgger your notification.

Thanks,
Ashutosh

View solution in original post

6 REPLIES 6

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

Is the BR executed in authorised state? Because it seems the BR is not triggered.

Also this has to be done rightly in Notification. you dont need br for this.


Just create simple notification where condition is states changes and it will tirgger your notification.

Thanks,
Ashutosh

Yes, I have given the script condition in the notification itself. I didn't create a BR.

I also tried simple notification where condition is states changes and it is not even triggering notification for any state changes.

Hi Priya,

Did you update the OOB condition in the advanced condition section?

Can you share what update you did?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

I modified the OOB condition in the advanced condition section like below:

var cr = new ChangeRequest(current);
answer = (cr.changesToAssess() || cr.changesToAuthorize() || cr.changesToScheduled() || cr.changesToImplement() || cr.changesToReview() || cr.changesToClosed() || cr.changesToCanceled());

before I modified:

var cr = new ChangeRequest(current);
answer = (cr.changesToScheduled() || cr.changesToImplement() || cr.changesToReview() || cr.changesToCanceled());

Thanks