[rt-devel] Lost while debugging keywords

Rich Lafferty rich+rt at lafferty.ca
Fri May 10 15:04:43 EDT 2002


Hi, all --

On my new RT installation, I've created some keywords and added
a keyword to a queue. For some reason, the value the keyword is 
being set to is not being (stored,displayed), and I can't figure
out why.

The transactions for the keyword selections are recorded fine:
 
> select all id, Ticket, Type, Field, NewValue from Transactions where
Type = 'Keyword' and Ticket='20020501018';
+----+-------------+---------+-------+----------+
| id | Ticket      | Type    | Field | NewValue |
+----+-------------+---------+-------+----------+
| 73 | 20020501018 | Keyword | 2     | One      |
| 74 | 20020501018 | Keyword | 2     | Three    |
| 75 | 20020501018 | Keyword | 2     | A        |
| 76 | 20020501018 | Keyword | 2     | B        |
| 77 | 20020501018 | Keyword | 2     | One      |
| 78 | 20020501018 | Keyword | 2     | Two      |
+----+-------------+---------+-------+----------+

and I'm really at a loss at how to continue debugging, because the
keyword implementation isn't jumping out at me.

In this section of /opt/rt2/bin/rt,

my $selects = $Ticket->QueueObj->KeywordSelects();
    #get the keyword selects
    print "Keywords:\n";
    while (my $select = $selects->Next) {
        print "\t" .$select->Name .": ";
        my $keys = $Ticket->KeywordsObj($select->id);   
        while (my $key = $keys->Next) {
# HONK
            print $key->KeywordObj->RelativePath($select->KeywordObj)
	    . "  ";
            
        }       
        print "\n";
    }

the point at which I've added "# HONK" is not reached. I can't even
see what $keys ISA to put debugging code into the Next() method.

Looking through the webserver logs, I see this:

[Fri May 10 14:09:29 2002] [error] [client 10.33.15.12] FastCGI:
server "/opt/rt2/bin/mason_handler.fcgi" stderr: DBD::mysql::st
execute failed: Column 'Keyword' cannot be null at
/usr/lib/perl5/site_perl/5.6.0/DBIx/SearchBuilder/Handle.pm line 320,
<GEN2608> line 164.
[Fri May 10 14:09:29 2002] [error] [client 10.33.15.12] FastCGI:
server "/opt/rt2/bin/mason_handler.fcgi" stderr:
RT::Handle=HASH(0x8bd2e2c) couldn't execute the query 'INSERT INTO
ObjectKeywords (KeywordSelect, ObjectType, Keyword, ObjectId) VALUES
(?, ?, ?, ?)'Column 'Keyword' cannot be null

and a few occurances of these:

[Fri May 10 14:10:35 2002] [error] [client 10.33.15.12] FastCGI:
server "/opt/rt2/bin/mason_handler.fcgi" stderr:
RT::Handle=HASH(0x8bd2e2c) couldn't execute the query 'INSERT INTO
ObjectKeywords (KeywordSelect, ObjectType, Keyword, ObjectId) VALUES
(?, ?, ?, ?)'Duplicate entry '2147483647-Ticket-1-8' for key 2

[Fri May 10 14:17:00 2002] [error] [client 10.33.15.12] FastCGI:
server "/opt/rt2/bin/mason_handler.fcgi" stderr: DBD::mysql::st
execute failed: Duplicate entry '2147483647-Ticket-2-11' for key 2 at
/usr/lib/perl5/site_perl/5.6.0/DBIx/SearchBuilder/Handle.pm line 320,
<GEN2850> line 164.

but it's still not jumping out at me.

Any ideas?

  -Rich

-- 
Rich Lafferty --------------+-----------------------------------------------
 Ottawa, Ontario, Canada    |  Save the Pacific Northwest Tree Octopus!
 http://www.lafferty.ca/    |    http://zapatopi.net/treeoctopus.html
rich at lafferty.ca -----------+-----------------------------------------------




More information about the Rt-devel mailing list