[rt-users] Simple Question: CustomField of Type SelectOneValue / How to get the Description from a Scrip/Template?
Ham MI-ID, Torsten Brumm
torsten.brumm at Kuehne-Nagel.com
Mon Jan 21 08:38:01 EST 2008
Hi RT Users,
Just a simple questions (hopefully). Inside a scrip i can get the CF
Value with: $Ticket->FirstCustomFieldValue('CFNAME'). If i need to the
the corresponding Description to this value, can i get this with:
$Ticket->FirstCustomFieldValue('CFNAME')->Description ?!?
Small Background to this. I need to create a small workflow for our
Development Department. A Business Unit creates a ticket and needs to
set some CF's. Dependeing on a Custom Field called "Module" a
responsible System Analyst will be informed.
My Idea is a small Scrip like this:
Condition: OnCreate
Action: SendEmail (from BPS WIKI)
Template: LocalCorrespond
To: {$Ticket->FirstCustomFieldValue('CFNAME')->Description;}
Subject: {$Ticket->Subject}
A new ticket has been created in queue .
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
-------------
{$Transaction->Content()}
Inside this local Correspond Template i would like to use this
$Ticket->FirstCustomFieldValue('CFNAME')->Description to get the correct
SystemAnalyst.
The Idea behind is a Mapping of Module -> System Analyst. This has also
the big advantage, that i can grant AdminCustomField to the Department
and they can administrate all the mappings by themself...
CF: Module
Values:
1: Module A Description: SystemAnalyst1 at company.com
2: Module B Description: SystemAnalyst2 at company.com
3: Module C Description: SystemAnalyst3 at company.com
4: Module D Description: SystemAnalyst4 at company.com
OK, now the Problem, the Idea above is not working:
Jan 21 13:36:56 bruchtal-www3 RT: Template parsing error: Can't call
method "Description" on an undefined value at template line 1. Stack:
[template:1] [/opt/rt3/lib/RT/Template_Overlay.pm:392]
[/opt/rt3/lib/RT/Template_Overlay.pm:313]
[/opt/rt3/lib/RT/Action/SendEmail.pm:120]
[/opt/rt3/lib/RT/ScripAction_Overlay.pm:234]
[/opt/rt3/local/lib/RT/Scrip_Overlay.pm:493]
[/opt/rt3/lib/RT/Scrips_Overlay.pm:239]
[/opt/rt3/lib/RT/Transaction_Overlay.pm:173]
[/opt/rt3/lib/RT/Record.pm:1461]
[/opt/rt3/lib/RT/Ticket_Overlay.pm:746]
[/opt/rt3/lib/RT/Interface/Web.pm:461]
[/opt/rt3/local/html/Ticket/Display.html:71]
[/opt/rt3/local/html/Ticket/Create.html:353]
[/opt/rt3/share/html/autohandler:291]
(/opt/rt3/lib/RT/Template_Overlay.pm:388)
Any Ideas????
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
More information about the rt-users
mailing list