Lost while debugging keywords

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,
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,
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/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------

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:
[table]
and I’m really at a loss at how to continue debugging, because the
keyword implementation isn’t jumping out at me.

I’ve tried a smaller data set to see what might be wacky, and I’m
even more stumped than before.

mysql> select all * from Keywords;
| id | Name | Description | Parent | Disabled |
| 1 | Testing | NULL | 0 | 0 |
| 2 | One | NULL | 1 | 0 |
| 3 | Two | NULL | 1 | 0 |
3 rows in set (0.00 sec)

mysql> select all * from KeywordSelects;
|id|Name|Keyword|Single|Depth|ObjectType|ObjectField|ObjectValue|Disabled|
| 1| Foo| 1| 1| 2| Ticket| Queue| 1| 0|

1 row in set (0.00 sec)

mysql> select all * from ObjectKeywords;
| id | Keyword | KeywordSelect | ObjectType | ObjectId |
| 1 | 2 | 1 | Ticket | 2147483647 |
1 row in set (0.00 sec)

mysql> select all * from Transactions where Type = ‘Keyword’;
|id|EffectiveTicket| Ticket|TimeTaken| Type|Field|OldValue|NewValue|Data|Creator|Created |
|89| NULL|20020501018| 0 |Keyword| 1| NULL| One|NULL| 4 |2002-05-10 19:14:27|
1 row in set (0.00 sec)

mysql> select all KeywordSelects.Name, Keywords.Name from
ObjectKeywords, KeywordSelects, Keywords where ObjectKeywords.Keyword
= Keywords.id and ObjectKeywords.KeywordSelect = KeywordSelects.id;
| Name | Name |
| Foo | One |
1 row in set (0.00 sec)

Yet all I get from the Web interface is “Foo” without any value set.

Guh?

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------

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.

Found it.

mysql> select all * from ObjectKeywords;
±—±--------±--------------±-----------±-----------+
| id | Keyword | KeywordSelect | ObjectType | ObjectId |
±—±--------±--------------±-----------±-----------+
| 1 | 2 | 1 | Ticket | 2147483647 |
±—±--------±--------------±-----------±-----------+

Dunno why I didn’t see this before, but “2147483647” is awfully
familiar. Seems I missed a field in my bigint-ticket-number patch.

Oknevermindthen. :slight_smile:

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------