[rt-users] Send Notify except if Owner Nobody?

Jean-Sebastien Morisset jsmoriss at mvlan.net
Mon Mar 3 08:43:17 EST 2008


Hi everyone,

I know there's a way to do this, but I'm still learning RT, so I don't
know exactly how to code this... I'd like to send an e-mail for a new
ticket to a group, if the owner is Nobody, and send it to the owner if
the owner is NOT Nobody. Right now I have a generic e-mail scrip...

The scrip:
    On Create Send Email with template Added to Queue Email

The template (Added to Queue Email):
    To: group-list at company.com
    Subject: {$Ticket->QueueObj->Name()} Queue: {$Ticket->Subject()}

    Ticket #{$Ticket->id} has been added to the {$Ticket->QueueObj->Name()} queue.

    -> Ticket URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

    {$Transaction->Content()}


So I guess I'm looking to change the template to something like:

---BEGIN---
if owner eq Nobody {
    To: group-list at company.com
    Subject: {$Ticket->QueueObj->Name()} Queue: {$Ticket->Subject()}

    Ticket #{$Ticket->id} has been added to the {$Ticket->QueueObj->Name()} queue.
} else {
    To: owner->email
    Subject: Your Ticket in {$Ticket->QueueObj->Name()} Queue: {$Ticket->Subject()}

    Ticket #{$Ticket->id} has been added to the {$Ticket->QueueObj->Name()} queue and assigned to you.
}

-> Ticket URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

{$Transaction->Content()}
---BEGIN---

What do you think?

Thanks!
js.
-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <jsmoriss at mvlan.net>



More information about the rt-users mailing list