[rt-users] How to notify a user that their ticket has been stolen?

Paul Wagland pwagland at allshare.nl
Thu May 6 05:18:53 EDT 2004


Hi all,

I  have finally managed to get e-mail sent to notify a user if the
ticket has been assigned to them. I am not sure why, but the inbuilt "On
Owner Change" does not work, so I created a "User defined" condition
with the following:

----
# If the field being changed in this transaction is 'Owner'
# then fire off this scrip.
if ($self->TransactionObj->Field eq 'Owner') {
    return(1);
} else {
    return(undef);
}
----

The Action is then "Notify Owner", the problem, is that this only
notifies the _new_ owner, and not the _old_ owner. This means that if
the ticket is stolen, then the old owner is not notified of that.

Does anyone know how to fix that?

Also, on a related note; I am using the Template "Global template:
Owner Change" which I have slightly modified, the contents are:

----
Subject: Ticket {$Ticket->id} has been assigned to you.


{$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.

      Ticket: {$Ticket->id}
 Transaction: {$Transaction->Description}
       Queue: {$Ticket->QueueObj->Name}
     Subject: {$Transaction->Subject || $Ticket->Subject || "(No
subject given)"}
       Owner: {$Ticket->OwnerObj->Name}
   Old Owner: {$Transaction->OldValue}
  Requestors: {$Ticket->RequestorAddresses}
      Status: {$Ticket->Status}
      Ticket: <{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}>
-------------------------------------------------------------------------
{$Transaction->Content()}
----

The problem is that the "Old Owner" is always a number... how do I
convert that number back into a user name?

Cheers,
Paul



More information about the rt-users mailing list