Ticket Data Seems Broken

I have a ticket in my system that when you view the “Basics” screen, you don’t see all the History. Instead, you get about 4-5 rows of history, and then you see:

Can’t call method “Name” on an undefined value at /usr/local/lib/perl5/site_perl/5.8.9/RT/Transaction_Overlay.pm line 700.

I’m assuming that it means that it can’t find the Principal information for a particular Transaction on the ticket, but I’m not sure.

Is there any way I can check the database for consistency, or somehow get past this error?

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
tjg@soe.ucsc.edu
831-459-5354

Hello Tim,

If you are on RT 3.8.3 and newer then you can use rt-validator to
check consistency of the DB.On Sat, Sep 5, 2009 at 12:17 AM, Tim Gustafsontjg@soe.ucsc.edu wrote:

I have a ticket in my system that when you view the “Basics” screen, you don’t see all the History. Instead, you get about 4-5 rows of history, and then you see:

Can’t call method “Name” on an undefined value at /usr/local/lib/perl5/site_perl/5.8.9/RT/Transaction_Overlay.pm line 700.

I’m assuming that it means that it can’t find the Principal information for a particular Transaction on the ticket, but I’m not sure.

Is there any way I can check the database for consistency, or somehow get past this error?

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
tjg@soe.ucsc.edu
831-459-5354


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.

Tim,

The history for any ticket comes from the Transaction Table. Each
Transaction record has Id’s in the fields that reference what the
transaction is about. For example, you have a ticket with a CF of ID #3.
The value of that Custom Field exists in the ObjectCustomFieldValue
Table. That transaction record has an id that points to that
ObjectCustomFieldValue record. If that ObjectCustomFieldRecord is
deleted from the table, then your “history” will stop at the
chronological time the value was put in the CF for that ticket. In other
words, the Transaction Table record is pointing to a
ObjectCustomFieldValue record that no longer exists. That’s why the
history stops where it does and says it can’t find something. In your
case, I suspect someone has deleted the User record or PrincipalId
record for that user. The history process can’t find that id. I suspect
someone has removed it using SQL or something. You can validate this by
looking at your DataBase.
First, look at the ticket and see if you can determine all ID’s relating
to that ticket. It could be a watcher, a CC, owner, requestor, whatever.

Using SQL (or whatever tool you have) and use the following code:

Select * from USERS
where Name like ‘whatever’;

Do this for all the users you can identify. The one you CAN’T find on
the USERS table is the one missing.

You can verify that by using this code:

Select * from TRANSACTIONS
where OBJECTTYPE = ‘RT::Ticket’
and (OldValue = ‘that ID’ OR NewValue = ‘that ID’ OR Creator - ‘that
ID’):

This should pull up the transactions that point to that ID. Since that
ID doesn’t exist, you have your error.

If I’m right, Let me know and I’ll show you how to correct it.

Kenn
LBNLOn 9/4/2009 1:17 PM, Tim Gustafson wrote:

I have a ticket in my system that when you view the “Basics” screen, you don’t see all the History. Instead, you get about 4-5 rows of history, and then you see:

Can’t call method “Name” on an undefined value at /usr/local/lib/perl5/site_perl/5.8.9/RT/Transaction_Overlay.pm line 700.

I’m assuming that it means that it can’t find the Principal information for a particular Transaction on the ticket, but I’m not sure.

Is there any way I can check the database for consistency, or somehow get past this error?

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
tjg@soe.ucsc.edu
831-459-5354


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

If you are on RT 3.8.3 and newer then you can use
rt-validator to check consistency of the DB.

This mostly worked. It ran and fixed enough stuff to make this particular ticket display properly, but then reported:

DBD::mysql::st execute failed: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay at /usr/local/sbin/rt-validator line 1058, line 6.

So, I have to fiddle some mySQL paramateres, apparently, and then try again. But at least this record is fixed now. Thanks!

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
tjg@soe.ucsc.edu
831-459-5354