[Rt-commit] r2936 - in rt/branches/3.4-RELEASE: . lib/RT

jesse at bestpractical.com jesse at bestpractical.com
Mon May 23 15:30:37 EDT 2005


Author: jesse
Date: Mon May 23 15:30:36 2005
New Revision: 2936

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/lib/RT/Record.pm
Log:
 r17673 at hualien:  jesse | 2005-05-23 15:27:11 -0400
 RT-Ticket: 6459
 RT-Status: resolved
 
 * Updates to the _AddLink return values from Todd Chapman.
 


Modified: rt/branches/3.4-RELEASE/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Record.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Record.pm	Mon May 23 15:30:36 2005
@@ -1052,6 +1052,12 @@
 ok (($addid, $addmsg) =$t1->AddLink( Type => 'DependsOn', Target => $t3->id));
 
 ok ($addid, $addmsg);
+my $link = RT::Link->new($RT::SystemUser);
+my ($rv, $msg) = $link->Load($addid);
+ok ($rv, $msg);
+ok ($link->LocalTarget == $t3->id, "Link LocalTarget is correct");
+ok ($link->LocalBase   == $t1->id, "Link LocalBase   is correct");
+
 ok ($t1->HasUnresolvedDependencies, "Ticket ".$t1->Id." has unresolved deps");
 ok (!$t1->HasUnresolvedDependencies( Type => 'blah' ), "Ticket ".$t1->Id." has no unresolved blahs");
 ok ($t1->HasUnresolvedDependencies( Type => 'approval' ), "Ticket ".$t1->Id." has unresolved approvals");
@@ -1300,7 +1306,7 @@
     my $TransString =
       "Record $args{'Base'} $args{Type} record $args{'Target'}.";
 
-    return ( 1, $self->loc( "Link created ([_1])", $TransString ) );
+    return ( $linkid, $self->loc( "Link created ([_1])", $TransString ) );
 }
 
 # }}}


More information about the Rt-commit mailing list