[Rt-commit] r10346 - in rt/branches/3.999-DANGEROUS: .
html/Ticket/Elements lib/RT/Model lib/RT/Shredder
jesse at bestpractical.com
jesse at bestpractical.com
Mon Jan 14 15:49:03 EST 2008
Author: jesse
Date: Mon Jan 14 15:49:01 2008
New Revision: 10346
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction
rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Link.pm
rt/branches/3.999-DANGEROUS/t/ticket/linking.t
Log:
r75034 at pinglin: jesse | 2008-01-14 15:14:17 -0500
* unsure why add_link broke things. reverting for now
Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction (original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction Mon Jan 14 15:49:01 2008
@@ -111,7 +111,7 @@
Steal => 'people',
Give => 'people',
- add_link => 'links',
+ AddLink => 'links',
delete_link => 'links',
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm Mon Jan 14 15:49:01 2008
@@ -2444,7 +2444,7 @@
unless ( $args{ 'Silent'. $direction } ) {
my ( $Trans, $Msg, $TransObj ) = $self->_new_transaction(
- Type => 'add_link',
+ Type => 'AddLink',
Field => $LINKDIRMAP{$args{'Type'}}->{$direction},
new_value => $remote_uri->URI || $remote_link,
TimeTaken => 0
@@ -2455,7 +2455,7 @@
if ( !$args{ 'Silent'. ( $direction eq 'Target'? 'Base': 'Target' ) } && $remote_uri->IsLocal ) {
my $OtherObj = $remote_uri->Object;
my ( $val, $msg ) = $OtherObj->_new_transaction(
- Type => 'add_link',
+ Type => 'AddLink',
Field => $direction eq 'Target' ? $LINKDIRMAP{$args{'Type'}}->{Base}
: $LINKDIRMAP{$args{'Type'}}->{Target},
new_value => $self->URI,
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm Mon Jan 14 15:49:01 2008
@@ -880,7 +880,7 @@
my $self = shift;
return _( "Subject changed to %1", $self->Data );
},
- add_link => sub {
+ AddLink => sub {
my $self = shift;
my $value;
if ( $self->new_value ) {
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Link.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Link.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Link.pm Mon Jan 14 15:49:01 2008
@@ -81,7 +81,7 @@
$objs->limit(
column => 'Type',
operator => '=',
- value => 'add_link',
+ value => 'AddLink',
);
$objs->limit( column => 'new_value', value => $self->Target );
while ( my ($k, $v) = each %$map ) {
@@ -98,7 +98,7 @@
$objs->limit(
column => 'Type',
operator => '=',
- value => 'add_link',
+ value => 'AddLink',
);
$objs->limit( column => 'new_value', value => $self->Base );
while ( my ($k, $v) = each %$map ) {
Modified: rt/branches/3.999-DANGEROUS/t/ticket/linking.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/linking.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/linking.t Mon Jan 14 15:49:01 2008
@@ -47,7 +47,7 @@
\Jifty->log->debug("Data is \$data");
open \$file, ">$filename" or die "couldn't open $filename";
- if (\$self->transaction_obj->Type eq 'add_link') {
+ if (\$self->transaction_obj->Type eq 'AddLink') {
\Jifty->log->debug("add_link");
print \$file \$data+1, "\n";
}
@@ -222,7 +222,7 @@
is(link_count($filename), 1, "scrips ok");
my $transactions = $ticket2->Transactions;
-$transactions->limit( column => 'Type', value => 'add_link' );
+$transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 1, "Transaction found in other ticket" );
is( $transactions->first->Field , 'ReferredToBy');
is( $transactions->first->new_value , $ticket->URI );
@@ -251,11 +251,11 @@
is(link_count($filename), 0, "scrips ok");
{
my $transactions = $ticket->Transactions;
- $transactions->limit( column => 'Type', value => 'add_link' );
+ $transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 2, "Still two txns on the base" );
$transactions = $ticket2->Transactions;
- $transactions->limit( column => 'Type', value => 'add_link' );
+ $transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 2, "Still two txns on the target" );
}
@@ -268,11 +268,11 @@
is(link_count($filename), 1, "scrips ok");
{
my $transactions = $ticket->Transactions;
- $transactions->limit( column => 'Type', value => 'add_link' );
+ $transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 2, "still five txn on the base" );
$transactions = $ticket2->Transactions;
- $transactions->limit( column => 'Type', value => 'add_link' );
+ $transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 3, "+1 txn on the target" );
}
@@ -285,11 +285,11 @@
is(link_count($filename), 1, "scrips ok");
{
my $transactions = $ticket->Transactions;
- $transactions->limit( column => 'Type', value => 'add_link' );
+ $transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 3, "+1 txn on the base" );
$transactions = $ticket2->Transactions;
- $transactions->limit( column => 'Type', value => 'add_link' );
+ $transactions->limit( column => 'Type', value => 'AddLink' );
is( $transactions->count, 3, "three txns on the target" );
}
($id,$msg) =$ticket->delete_link(Type => 'RefersTo', Target => $ticket2->id, SilentTarget => 1);
More information about the Rt-commit
mailing list