[rt-users] Can you help with this minor hack?

Travis Campbell travis.campbell at amd.com
Thu Feb 21 15:51:28 EST 2002


On Thu, Feb 21, 2002 at 09:05:26PM +0100, Bruce Campbell wrote:
> On Thu, 21 Feb 2002, Dave Ewart wrote:
> 
> > <%$Ticket->Requestors->EmailsAsString%>
> 
> At a rough guess, try:
> 
> % my $requestors = $Ticket->Requestors;
> % while( my $this_requestor = $requestors->Next ){
> %     if( defined( $this_requestor->OwnerObj ) ){
> 	<% $this_requestor->OwnerObj->RealName %>
> %     }
> % }
> 
> Of course, <% $Ticket->Requestors->First->OwnerObj->RealName %> might not
> work either.  I need caffiene to get to sleep.
> 

Won't this just display the realname of the $Ticket owner?  

Hmm.  No, after testing both, they do appear to return the realname of the
Requestor.  

Why wouldn't $Ticket->Requestors->First->OwnerObj->RealName return the
same thing as $Ticket->OwnerObj->RealName?  

Is it because the former has no OwnerObj assigned to it, causing the
RT::Watcher->OwnerObj method to load the RT::User object for the first
watcher returned by First?



I'm so confused. :-)

Travis
-- 
 Travis Campbell  -  Unix Systems Administrator =      travis at beast.amd.com
    5900 E. Ben White Blvd, Austin, TX 78741    =   travis.campbell at amd.com
    TEL: (512) 602-1888  PAG: (512) 604-0341    =   webmaster at beast.amd.com 
============================================================================
      "Does anything work as expected?"  Yes.  An axe through the CPU.





More information about the rt-users mailing list