At Friday 5/11/2007 03:22 PM, Jared Hanks wrote:
Hello,

I'm trying to set the RefersTo link to another ticket while creating it, but am not having any success.

I have the following in Custom action cleanup code:

1;
my $AttachObj = $self->TransactionObj->Attachments->First;
# go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {
     return 1;
}
my $content = $AttachObj->Content;
if( $content =~ m/^\RefersTo:\E\s*(\S+)\s*$/m ) {
      $self->TicketObj->RefersTo( $1 );
}

if( $content =~ m/^\QSet-Status:\E\s*(\S+)\s*$/m ) {
      $self->TicketObj->SetStatus( $1 );
}

I'm able to set the status but not the Refers to link. Any help is appreciated.

Thanks,
Jared

Jared,

$self->TicketObj->RefersTo will return the link information for the ticket. To set links, you should use AddLink (see Ticket API).

Steve
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to