[rt-users] Finding username for taken ticket
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Mon Oct 11 06:44:27 EDT 2004
Todd Chapman wrote:
> Try: $Transaction->CreatorObj->Name()
Todd, it's buggy way. Ownership assigner not allways is new owner.
Jeremy, use next code:
{
my $user = RT::User->new( $RT::SystemUser );
unless( $user ) {
die "Can't create new RT::User object";
}
$user->Load( $Transaction->NewValue );
unless( $user->Id ) {
die "Can't load RT::User #". $Transaction->NewValue;
}
# Here you can cooperate any user's properties.
# see also perldoc RT/User.pm
$user->Name();
}
>
> -Todd
>
> On Fri, Oct 08, 2004 at 11:39:28AM -0500, Jeremy Baumgartner wrote:
>
>>We want to send a response to the requestor when someone takes their
>>ticket. The template currently has {$Transaction->NewValue()} where we
>>want the username to appear. What is the best way to get the username
>>instead of the user id number?
>>
>>--
>>Jeremy Baumgartner
>>CAE UNIX Systems Staff
>>
>>"Debugging is twice as hard as writing the code in the first place.
>> Therefore, if you write the code as cleverly as possible, you are,
>> by definition, not smart enough to debug it."
>> - Brian W. Kernighan
>>
More information about the rt-users
mailing list