[rt-users] Why doesn't this scrip code work?

Todd Chapman rt at chaka.net
Tue Jan 27 14:55:11 EST 2004


Jesse,

If I change the scrip condition to On Create, the code no 
longer works. Is this because the scrip is run before the
link is created? How can I refer to the parent of a ticket
in an On Create scrip?

Thanks.

-Todd

On Tue, Jan 27, 2004 at 02:12:51PM -0500, Jesse Vincent wrote:
> 
> 
> 
> On Tue, Jan 27, 2004 at 01:19:33PM -0500, Todd Chapman wrote:
> > Ticket #152 is a Child of Ticket #151.
> > 
> > I created an On Correspond scrip with this preparation code:
> > 
> > my $Ticket = $self->TicketObj;
> > $RT::Logger->debug("Ticket ID: " . $Ticket->id);
> > my $members = $Ticket->MemberOf;
> > my $link = $members->First;
> > my $parent = $link->BaseObj;
> 
> 
> Ticket is a MemberOf *. You want to look at targets, not bases
> > $RT::Logger->debug("BaseObj ID: " . $parent->id);
> > 
> > 
> > I would expect BaseObj ID to be 151. Not so. The Ticket
> > ID and BaseObjID print as 152.
> > 
> > What am I missing?
> > 
> > Thanks! 
> > 
> > -Todd (RT 3.0.8)
> > 
> > _______________________________________________
> > rt-users mailing list
> > rt-users at lists.bestpractical.com
> > http://lists.bestpractical.com/mailman/listinfo/rt-users
> > 
> > Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
> > 
> 
> -- 
> http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the rt-users mailing list