[Bps-public-commit] r12418 - in sd/branches/usability: lib/App/SD/Replica/RT t
jesse at bestpractical.com
jesse at bestpractical.com
Fri May 16 23:57:49 EDT 2008
Author: jesse
Date: Fri May 16 23:57:49 2008
New Revision: 12418
Modified:
sd/branches/usability/Makefile.PL
sd/branches/usability/lib/App/SD/Replica/RT/PullEncoder.pm
sd/branches/usability/t/sd-rt.t
Log:
* Actually tie attachments to tickets
Modified: sd/branches/usability/Makefile.PL
==============================================================================
--- sd/branches/usability/Makefile.PL (original)
+++ sd/branches/usability/Makefile.PL Fri May 16 23:57: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/branches/usability/lib/App/SD/Replica/RT/PullEncoder.pm
==============================================================================
--- sd/branches/usability/lib/App/SD/Replica/RT/PullEncoder.pm (original)
+++ sd/branches/usability/lib/App/SD/Replica/RT/PullEncoder.pm Fri May 16 23:57: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/branches/usability/t/sd-rt.t
==============================================================================
--- sd/branches/usability/t/sd-rt.t (original)
+++ sd/branches/usability/t/sd-rt.t Fri May 16 23:57: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