[rt-users] Keyword problems

Jesse jesse at fsck.com
Fri Jul 20 17:12:21 EDT 2001


The problem you've run into is that RT can't truly delete a Keyword,
it merely marks it as unusable for new tickets.  The basic idea
is that you don't want to blow away something that old tickets might 
be using. 

The UI for this _will_ improve with time, but for now,
what you need to do to restore this keyword is go into the database and 

SELECT * from Keywords where Name = 'thename';

and then

UPDATE Keywords set Disabled = 0 where id = theidreturnedabove;






On Fri, Jul 20, 2001 at 03:57:59PM -0400, Dave McMahon wrote:
>  I am having a problem with keywords.
> 
>  I can not re-add a keyword after it was deleted (Can't make
> up my mind ;-}
> 
>  I was running rt-2-0-0 when I created the problem. I upgraded to
> 2-0-1 and the problem still exists.
> 
>  I have tried it with new keywords using 2.0.1 and same thing happens.
> 
>  I am not an sql guy...
> but here is partial dump of the rt2 db
> -----------------------------start----------------------------
> CREATE TABLE Keywords (
>   id int(11) NOT NULL auto_increment,
>   Name varchar(255) NOT NULL default '',
>   Description varchar(255) default NULL,
>   Parent int(11) default NULL,
>   Disabled smallint(6) NOT NULL default '0',
>   PRIMARY KEY  (id),
>   UNIQUE KEY Name (Name,Parent),
>   KEY Name_2 (Name),
>   KEY Parent (Parent)
> ) TYPE=MyISAM;
> 
> #
> # Dumping data for table 'Keywords'
> #
> 
> INSERT INTO Keywords VALUES (1,'Archie',NULL,0,1);
> INSERT INTO Keywords VALUES (2,'NEAT',NULL,1,0);
> INSERT INTO Keywords VALUES (3,'EFT1',NULL,1,0);
> INSERT INTO Keywords VALUES (4,'EFT2',NULL,1,0);
> INSERT INTO Keywords VALUES (5,'Bucky',NULL,0,1);
> INSERT INTO Keywords VALUES (6,'Jughead',NULL,0,1);
> INSERT INTO Keywords VALUES (7,'Veronica',NULL,0,1);
> INSERT INTO Keywords VALUES (8,'sally',NULL,0,0);
> INSERT INTO Keywords VALUES (9,'joey',NULL,0,1);
> INSERT INTO Keywords VALUES (10,'Archie-1',NULL,0,1);
> 
> 
> --------------------------end-------------------------------------
> 
>  NOTE: The only live keyword I could see from this list when
> I did this dump was 'sally'.
> 
> Here's how I created the problem
> --------------------------------
>  I created a keyword, 'Archie' and tried to delete it and add it
> again.
> 
>  -login as root
>    -Configuration
>     -Keywords
>      -Type in Archie
>       -Add
>       Result * Keyword created
> 
>    -Configuration
>     -Keywords
>      -edit Archie
>       -Delete
>        Result * The new value has been set
> 
>    -Configuration
>     -Keywords
>      Does not show Archie
> 
>    -Configuration
>     -Keywords
>      -Type in Archie
>       -Add
>        Results * Could not create keyword
> 
> 
> 
> Here are the rt log entries for trying to Add Archie after a delete.
> ---------------------------------start------------------------------------
> Ticket 14 created in queue 'general'DBD::mysql::st execute failed: Duplicate
> entry 'Archie-0' for key 2 at
> /usr/local/lib/perl5/site_perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 317,
> <GEN75> line 96.
> RT::Handle=HASH(0xcc2e9c) couldn't execute the query 'INSERT INTO Keywords
> (Description, Name, Parent) VALUES (?, ?, ?)'Duplicate entry 'Archie-0' for
> key 2
> DBD::mysql::st execute failed: Duplicate entry 'Archie-0' for key 2 at
> /usr/local/lib/perl5/site_perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 317,
> <GEN88> line
> 96.
> RT::Handle=HASH(0xc8d148) couldn't execute the query 'INSERT INTO Keywords
> (Description, Name, Parent) VALUES (?, ?, ?)'Duplicate entry 'Archie-0' for
> key 2
> DBD::mysql::st execute failed: Duplicate entry 'Archie-0' for key 2 at
> /usr/local/lib/perl5/site_perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 317,
> <GEN81> line
> 96.
> RT::Handle=HASH(0xb3f3dc) couldn't execute the query 'INSERT INTO Keywords
> (Description, Name, Parent) VALUES (?, ?, ?)'Duplicate entry 'Archie-0' for
> key 2
> DBD::mysql::st execute failed: Duplicate entry 'Archie-0' for key 2 at
> /usr/local/lib/perl5/site_perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 317,
> <GEN98> line
> 96.
> RT::Handle=HASH(0xce26f0) couldn't execute the query 'INSERT INTO Keywords
> (Description, Name, Parent) VALUES (?, ?, ?)'Duplicate entry 'Archie-0' for
> key 2
> DBD::mysql::st execute failed: Duplicate entry 'bucky-0' for key 2 at
> /usr/local/lib/perl5/site_perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 317,
> <GEN79> line 96.
> RT::Handle=HASH(0xe3ab58) couldn't execute the query 'INSERT INTO Keywords
> (Description, Name, Parent) VALUES (?, ?, ?)'Duplicate entry 'bucky-0' for
> key 2
> DBD::mysql::st execute failed: Duplicate entry 'Archie-0' for key 2 at
> /usr/local/lib/perl5/site_perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 317,
> <GEN114> line 63.
> RT::Handle=HASH(0xc9e130) couldn't execute the query 'INSERT INTO Keywords
> (Description, Name, Parent) VALUES (?, ?, ?)'Duplicate entry 'Archie-0' for
> key 2
> 
> 
> --------------------------------end-------------------------------------
> 
>  I can go into mysql and remove them directly, but I don't think that would
> be a
> good idea. Any way to delete them or to make them reappear?
> 
> 
> Dave McMahon
> 
> 
> 
> 
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
> 

-- 
jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com 
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

autoconf is your friend until it mysteriously stops working, at which 
point it is a snarling wolverine attached to your genitals by its teeth
 (that said, it's better than most of the alternatives)  -- Nathan Mehl




More information about the rt-users mailing list