[rt-users] Why doesn't this scrip code work?
Jesse Vincent
jesse at bestpractical.com
Tue Jan 27 16:01:34 EST 2004
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