[Bps-public-commit] r12490 - in sd/trunk: . lib/App/SD/Replica/RT
jesse at bestpractical.com
jesse at bestpractical.com
Sat May 17 09:11:50 EDT 2008
Author: jesse
Date: Sat May 17 09:11:49 2008
New Revision: 12490
Modified:
sd/trunk/ (props changed)
sd/trunk/Makefile.PL
sd/trunk/lib/App/SD/Replica/RT/PullEncoder.pm
sd/trunk/t/sd-rt.t
Log:
r31152 at dhcp113 (orig r12418): jesse | 2008-05-17 12:57:49 +0900
* Actually tie attachments to tickets
Modified: sd/trunk/Makefile.PL
==============================================================================
--- sd/trunk/Makefile.PL (original)
+++ sd/trunk/Makefile.PL Sat May 17 09:11:49 2008
@@ -6,14 +6,20 @@
version_from('lib/App/SD.pm');
requires 'Prophet'; # URI UNIVERSAL::require Params::Validate Path::Class Class::Accessor
-requires 'RT::Client::REST'; # RT::Client::REST::Ticket
-requires 'DateTime::Format::HTTP';
features(
+ 'RT sync' => [
+ -default => 1,
+ 'RT::Client::Rest' => 0, # RT::Client::REST::Ticket
+ 'DateTime::Format::HTTP' => 0,
+
+ ],
+
'Hiveminder sync' => [
-default => 1,
+ 'Net::Jifty' => 0,
recommends('Jifty'),
],
);
-
+auto_install();
&WriteAll;
Modified: sd/trunk/lib/App/SD/Replica/RT/PullEncoder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/RT/PullEncoder.pm (original)
+++ sd/trunk/lib/App/SD/Replica/RT/PullEncoder.pm Sat May 17 09:11:49 2008
@@ -82,7 +82,7 @@
$change->add_prop_change( name => 'creator', old => undef, new => $self->resolve_user_id_to( email => $args{'attachment'}->{'Creator'}));
$change->add_prop_change( name => 'content', old => undef, new => $args{'attachment'}->{'Content'});
$change->add_prop_change( name => 'name', old => undef, new => $args{'attachment'}->{'Filename'});
- $change->add_prop_change( name => 'ticket', old => undef, new => $args{ticket}->{uuid},);
+ $change->add_prop_change( name => 'ticket', old => undef, new => $self->sync_source->uuid_for_remote_id( $args{'ticket'}->{'id'} ));
$args{'changeset'}->add_change( { change => $change } );
}
@@ -223,7 +223,7 @@
$change->add_prop_change( name => 'type', old => undef, new => $args{'txn'}->{'Type'});
$change->add_prop_change( name => 'creator', old => undef, new => $self->resolve_user_id_to( email => $args{'txn'}->{'Creator'}));
$change->add_prop_change( name => 'content', old => undef, new => $args{'txn'}->{'Content'});
- $change->add_prop_change( name => 'ticket', old => undef, new => $args{ticket}->{uuid},);
+ $change->add_prop_change( name => 'ticket', old => undef, new => $self->sync_source->uuid_for_remote_id( $args{'ticket'}->{'id'} ));
$args{'changeset'}->add_change( { change => $change } );
}
Modified: sd/trunk/t/sd-rt.t
==============================================================================
--- sd/trunk/t/sd-rt.t (original)
+++ sd/trunk/t/sd-rt.t Sat May 17 09:11:49 2008
@@ -144,7 +144,6 @@
my $rt_attach_uuid;
run_output_matches( sd => [qw/ticket attachment list --uuid/, $yatta_uuid], [qr/(.*?)(?{ $rt_attach_uuid = $1 }) bplogo.gif image\/gif/] );
-
ok($rt_attach_uuid);
diag("Check to see if YATTA's attachment is binary-identical to the original one");
More information about the Bps-public-commit
mailing list