[rt-users] Setting RefersTo links

Stephen Turner sturner at MIT.EDU
Fri May 11 15:42:06 EDT 2007


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 




More information about the rt-users mailing list