[Rt-devel] obscure stricture explosion

Jesse Vincent jesse at bestpractical.com
Thu Jun 14 13:12:32 EDT 2007


On Jun 14, 2007, at 1:01 PM, Nicholas Clark wrote:

> If I'm getting this error message:
>
> Can't locate object method "EmailAddress" via package "No object  
> mapping for field" (perhaps you forgot to load "No object mapping  
> for field"?) at lib/RT/Ticket_Overlay.pm line 1351.
>
> where the offending lines in 3.6.3's RT/Ticket_Overlay.pm are:
>
>     if ( $self->CurrentUser->PrincipalId == ($args{'PrincipalId'}  
> || 0)
>        or    lc( $self->CurrentUser->UserObj->EmailAddress )
>           eq lc( RT::User::CanonicalizeEmailAddress(undef, $args 
> {'Email'}) || '' ) )
>     {
>
> and my calling code is
>
> $t->AddWatcher(Type => 'Cc', PrincipalId => $g->Id);
>

Can I see the initialization of $t?  In RT, you should ~always be  
handing a currentuser to ->new().



> where $g->Id is 55, and $t is a valid RT::Ticket object
>
>
> then, where do I start looking to work out what my bug is?
>
>
> My script (it's trying to be a regression test) started with:
>
> use_ok('RT');
> use_ok('RT::Ticket');
> use_ok('RT::Queue');
> RT::LoadConfig();
> RT::Init();
>
>
> And I'd not set CurrentUser. Is that my problem?
>
> Nicholas Clark
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/ 
> rt-devel
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070614/83bba180/PGP.pgp


More information about the Rt-devel mailing list