KeywordSelect --requiring a value before a ticket can be created

I figured this out.

In case anyone is interested:
In in the subroutine Create, I added:
KeywordSelect-9 => undef,
in my %args.

Put $KeywordSelectObj in your initialization line:
my ($ErrStr, $QueueObj, $KeywordSelectObj, $Owner, $resolved);

Then to force a Keyword to be selected, I also added in the sub Create:

if (defined($args{'KeywordSelect-9'})) {

unless (defined ($KeywordSelectObj)) {
    $RT::Logger->debug( "$self No Action City given for ticket

return (0, 0,“Could not create ticket. Action City not set”.);

This works for multi- and single value KeywordSelects.
(My KeywordSelect-9 is for Action Cities)


-----Original Message-----
From: Colleen
Sent: Tuesday, July 02, 2002 2:35 PM
Subject: [rt-devel] KeywordSelect

I’m making some modifications in so that a KeywordSelect-9
needs to be defined before a ticket can be created.

In the list of Create (ARGS) KeywordSelect- is there, but does
anyone know how I can use it?

From the comments in
“KeywordSelect- – an array of keyword ids for that keyword