Hello,
I am trying to set the category custom field when creating a ticket via
a script but I’m not having much luck. I am familiar with how to do
this for other custom fields:
my $ticket = new RT::Ticket($CurrentUser);
my $ticket_body = MIME::Entity->build(Data => $cgiobj->param(“Content”),
Type => ‘text/plain’);
my %ticket_vals = ( Queue => $cgiobj->param(“Queue”),
Status => $cgiobj->param(“Status”),
‘CustomField-8’ => $cgiobj->param(“Type”),
Requestor => $useremail,
CC => $cgiobj->param(“Cc”),
AdminCC => $cgiobj->param(“AdminCc”),
Subject => $cgiobj->param(“Subject”),
‘CustomField-12’ => $cgiobj->param(“Submitted”),
‘CustomField-14’ => $cgiobj->param(“OS”),
MIMEObj => $ticket_body
);
my (my $id, my $transaction_object, my $err) =
$ticket->Create(%ticket_vals);
However, I have no idea how to set the Category custom fields in this
way. For example, would it be thus (where CustomField-22 is my
category-subcategory field):
……
‘CustomField-22’ => $cgiobj->param(“Service”) . “:” . $cgiobj->param(“Job”)
……
or perhaps thus:
……
‘CustomField-22’ => $cgiobj->param(“Service”) . “\” . $cgiobj->param(“Job”)
……
Any help as always is very welcome! I am running RT 3.5.5.
TIA,
Stewart
Stewart Tranter
Computing Services
Loughborough University
E: s.g.tranter@lboro.ac.uk
W: http://www.lboro.ac.uk/computing/
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989