[rt-users] How to set a specific 'Depended on' by from scrip

Kevin Falcone falcone at bestpractical.com
Tue Nov 27 12:16:58 EST 2012


On Tue, Nov 27, 2012 at 02:39:40PM +0100, Xavier Reigner wrote:
>    In addition, I'd like to specify a link "Depended on by" to the tickets according to the
>    previous test. I'm still confusing how I should update this field.
>    $RT::Logger->info("Auto reference ticket #". $T_Obj->id ." to ticket #1234" );
>    my ($status, $msg) = $self->TicketObj->_Set( 'DependedOnBy', '1234');

_Set is really dangerous.  In general, you should never use it.

You want to call AddLink on your ticket.
http://bestpractical.com/rt/docs/latest/RT/Ticket.html#AddLink

-kevin

>    unless( $status ) {
>    $RT::Logger->error( "Unable to assign the ticket DependedOnBy" );
>    return undef;
>    }
>    return 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20121127/d792ea1d/attachment.sig>


More information about the rt-users mailing list