On Thu, Feb 06, 2014 at 01:02:22PM +0000, Ethier, Michael wrote:
>    When I try this code, it runs but it's not outputting what I need:
>    my $trueuser = $TicketObj->Requestors->UserMembersObj->First->RealName;
>    $RT::Logger->debug("trueuser is: ".$trueuser);
> 
>    Resulting output looks to be whatever is before the "@" in the email 
> address, not the
>    RealName:
> 
>    [3263] [Thu Feb  6 12:55:07 2014] [debug]: trueuser is: ethier ((eval 
> 625):28)

RealName is set to the Email Address' 'phrase' which is the "Smith,
Joe" you mention.  I suspect your test email isn't sending what you
expect.  Or, the user already exists in your system with that bogus
RealName (you can confirm this by searching for the user in the admin
UI and reading the History tab).

You may want to try
$self->TransactionObj->ContentObj->GetHeader('From') and parse it
manually if you can't trust your Users table (which is what Requestors
is searching).

-kevin

Attachment: pgp93V9w6aY_c.pgp
Description: PGP signature

Reply via email to