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

Todd Chapman rt at chaka.net
Tue Jan 27 15:18:44 EST 2004


Jesse,

Allthough you may be afraid of my RT code at this point,
I am interested in getting involved with RT development.
I would take a crack at the changes below but I have
some questions about the development process that were
never answered in this post:

http://lists.fsck.com/pipermail/rt-devel/2004-January/005303.html

...wanting to contribute

-Todd

On Tue, Jan 27, 2004 at 04:01:34PM -0500, Jesse Vincent wrote:
> 
> 
> 
> On Tue, Jan 27, 2004 at 03:06:30PM -0500, Todd Chapman wrote:
> > Nevermind. Web.pm tells all:
> > 
> >     my ( $id, $Trans, $ErrMsg ) = $Ticket->Create(%create_args);
> >     unless ( $id && $Trans ) {
> >         Abort($ErrMsg);
> >     }
> >     my @linktypes = qw( DependsOn MemberOf RefersTo );
> > 
> >     foreach my $linktype (@linktypes) {
> >         foreach my $luri ( split ( / /, $ARGS{"new-$linktype"} ) ) {
> >             $luri =~ s/\s*$//;    # Strip trailing whitespace
> >             my ( $val, $msg ) = $Ticket->AddLink(
> >                 Target => $luri,
> >                 Type   => $linktype
> >             );
> >             push ( @Actions, $msg ) unless ($val);
> >         }
> 
> Actually, that code predates Ticket->Create's ability to accept links as
> attributes. it could be refactored to pass the linking code into create.
> I've opened a ticket about this issue.
> > 
> > 
> > Now to figure out how to create a custome scrip condition...
> -- 
> http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the rt-users mailing list