[rt-users] Ticket Data Seems Broken

Ken Crocker kfcrocker at lbl.gov
Fri Sep 4 17:36:32 EDT 2009


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
LBNL

On 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 at soe.ucsc.edu
> 831-459-5354
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
>
>   



More information about the rt-users mailing list