[rt-users] How to get CurrentUser from a scrip written to a CF?

Ruslan Zakirov ruz at bestpractical.com
Mon Jan 21 14:16:19 EST 2008


$self->Transaction->Creator - id
$self->Transaction->CreatorObj - RT::User object

On Jan 21, 2008 10:06 PM, Ham MI-ID, Torsten Brumm
<torsten.brumm at kuehne-nagel.com> wrote:
> Hi RT Users,
>
> Another small problem. I'm trying to write down the CurrentUser
> Information acting on a ticket to a CF.
>
> I tried this code:
>
> my $queue = $ticket->QueueObj;
> my $actualuser = $session{CurrentUser}->Name;
> $self->TicketObj->AddCustomFieldValue(Field => 'Assigned_by_SA', Value
> => $acutaluser, RecordTransaction => 0);
> return 1;
>
> Whichs ends up with a strange error message: %sessions not found...
>
> I can't find any good solution at the wiki yet.
>
> Thanks
>
> Torsten
> Kuhne + Nagel (AG & Co.) KG, Geschaftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Alfred Manke, Thorsten Meincke, Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn (Stellv.), Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Personlich haftende Gesellschaft: Kuhne & Nagel A.G., Sitz: Contern/Luxemburg Geschaftsfuhrender Verwaltungsrat: Klaus-Michael Kuhne
>
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list