[rt-users] Newbie trouble: keywords don't work

Alexander Dupuy dupuy at sysd.com
Thu May 16 12:54:37 EDT 2002


Given that it seems like every single user who tries to set up keywords 
has this problem (I had it myself, but managed to figure it out without 
inflicting another request for explanation to the list), just having the 
Keywords tutorial doesn't seem like enough.

Is there any reason the following patch (untested) or something much 
like it, shouldn't be used to prevent newbies from making this classic 
mistake?

--- old/usr/local/rt2/lib/RT/Keyword.pm    Fri Dec 14 14:03:08 2001
+++ /usr/local/rt2/lib/RT/Keyword.pm    Thu May 16 12:49:27 2002
@@ -107,6 +107,11 @@
         $RT::Logger->err( "can't yet specify parents by name, sorry: ". 
$args{'Parent'});
         return(0,'Parent must be specified by id');
      }
+
+    if ( $args{'Name'} =~ m|/| ) {
+       $RT::Logger->err( "keyword names cannot contain '/', sorry: ". 
$args{'Name'});
+       return(0,'Keyword names cannot contain /');
+    }

      my $val = $self->SUPER::Create(Name => $args{'Name'},
                                    Description => $args{'Description'},

@alex
-- 
mailto:dupuy at sysd.com





More information about the rt-users mailing list