Sending an email to Incident Assignee of a task

Hi,

We have a requirement that when the task is closed the assignee of the incident related to the task needs to be notified.  We are using SM 9.62 with PD.

Attached are the steps I used however the notification is not getting sent to the assignee of the Incident.  Attached please find the sequence I have used.

Thanks!

  • Verified Answer

    Hi,

    Personally, I would put my ruleset on 'After successful enter' of the Closure phase, so that if there is a failure the email won't be sent.

    Since the value of the assignee of the parent record is not stored in the imTask record, you should select 'Set Using Javascript' for Recipient and not 'Current Record'.  You could then use a JavaScript something like this:

    //JavaScript to get assignee from parent IM
    var IMrecord = new SCFile("probsummary");
    var IMnumber = record.parent_incident;
     
    if(IMrecord.doSelect( "number=\"" IMnumber "\"") == RC_SUCCESS)
    {
    var users = new Array();
    users [0] = IMrecord.assignee_name;
    }
     
    You might also want to attach a condition to the RuleSet itself, so it will only run if the Assignee field of the parent is populated.  That is easy to do through the condition editor.  Let me know if you need any help with that.   I hope this helps.
     
    Audrey