Retrieving Requestors name in an Approval template

Hi everyone,

I’m running RT 3.4.0 on debian linux 3.1, perl 5.8.4, apache 1.3 with mod_perl 1 and mysql 4.1.9.

Pls, can anyone help me with this. I am working on setting approvals in RT which is working fine if i set the owner to a particular name or Id, however i want to set the approval tickets owner to the requestor and i don’t know how to get the requestor’s name in code. I used $Ticket->RequestorAddresses but it didn’t work. It keeps setting the owner to Nobody.

Pls, all help would be appreciated. Thanks.

The aproval template i’m using is:

===Create-Ticket: CustomerCare Approval

Depended-On-By: {$Tickets{‘TOP’}->Id}
Type: approval
Queue: Approvals
Owner: {$Ticket->RequestorAddresses}
Status: Open
Content-Type: text/html
Content: {$Ticket->OwnerObj->Name} has created a ticket in the {$Ticket->QueueObj->Name} Queue. you should review and approve it, so that the work can be completed.



Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id+1} to approve or reject this ticket, or {$RT::WebURL}Approvals/ to batch-process all your pending approvals.



{$Transaction->Content()}

ENDOFCONTENT

Send instant messages to your online friends http://uk.messenger.yahoo.com

Hi everyone,
I sent this mail earlier…Please can anyone help out with…how can i retrieve a requestors name instead of his email address in code…I use $Ticket->RequestorAddresses to retrieve the email but i don’t know how to retrieve the name or id of the requestor instead.

Thanks all.

Send instant messages to your online friends http://uk.messenger.yahoo.com

how can i retrieve a requestors name instead of his email address in code
I use $Ticket->RequestorAddresses to retrieve the email but i don’t know
how to retrieve the name or id of the requestor instead.

Requestors don’t have names. Requestors are email addresses. Users have
names. In order to find the user’s name, you have to load a user based on
the requestor’s email address and then access the user’s name.

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
"Make lunch, not war." - me

I sent this mail earlier…Please can anyone help out with…how can i
retrieve a requestors name
instead of his email address in code…I use $Ticket->RequestorAddresses
to retrieve the email but i
don’t know how to retrieve the name or id of the requestor instead.

Someone feel free to correct me if I’m wrong, but I saw this in the code:

Ticket->Requestors->UserMembersObj->First->Name

Don’t know if this will help, but in a template we use:

$Transaction->CreatorObj->RealName

We use this for all incoming emails, so technically it is the Requestor’s
real name, but this may not be what you’re looking for.

-matt

Matthew Hanley
mhanley@cxtec.com