& /Admin/Elements/Header, Title => 'Admin KeywordSelects' &> <& /Admin/Elements/Tabs, current_tab => 'Admin/KeywordSelects/' &> A KeywordSelect is a link between a Keyword and a object (currently just Tickets), titled by the Name field of the Keyword such that:
Create KeywordSelect<%INIT> my $KeywordSelect = new RT::KeywordSelect($session{CurrentUser}); my($title, $submit); if ( $Create ) { $title = "Create a new KeywordSelect"; $submit = "Create"; $id = "new"; } else { if ( $id eq 'new' ) { $id = $KeywordSelect->Create ( Parent => $Parent, ObjectType => $ObjectType, ObjectField => $ObjectField, ObjectValue => $ObjectValue, Single => $Single, Generations => $Generations, ) or Abort "can't create KeywordSelect"; } else { $KeywordSelect->Load($id) || Abort("Can't load keyword id $id"); #false laziness $KeywordSelect->SetParent($Parent) if defined($Parent); $KeywordSelect->SetObjectType($ObjectType) if defined($ObjectType); $KeywordSelect->SetObjectField($ObjectField) if defined($ObjectField); $KeywordSelect->SetObjectValue($ObjectValue) if defined($ObjectValue); $KeywordSelect->SetSingle($Single) if defined($SingleMagic); $KeywordSelect->SetGenerations($Generations) if defined($Generations); } $title = "Modify the KeywordSelect ". $KeywordSelect->KeywordObj->Name. ""; $submit = "Modify"; } my $parents = new RT::Keywords($session{CurrentUser}); $parents->UnLimit; my $parent; my $queues = new RT::Queues($session{CurrentUser}); $queues->UnLimit; my %queues; my $queue; $queues{$queue->id} = $queue->Name while $queue = $queues->Next; %INIT> <%ARGS> $id => undef $Create => undef $Parent => undef $ObjectType => undef $ObjectField => undef $ObjectValue => undef $Single => undef $SingleMagic => undef $Generations => undef %ARGS> <& /Admin/Elements/ModifyKeywordSelect, 'Create'=>'1' &> |
Modify KeywordSelect<& /Admin/Elements/SelectModifyKeywordSelect &> |