[Bps-public-commit] r16299 - sd/trunk/lib/App/SD/Replica/hm

ruz at bestpractical.com ruz at bestpractical.com
Tue Oct 14 23:34:37 EDT 2008


Author: ruz
Date: Tue Oct 14 23:34:37 2008
New Revision: 16299

Modified:
   sd/trunk/lib/App/SD/Replica/hm/PushEncoder.pm

Log:
* first pass on integrating comments, but it doesn't work :(

Modified: sd/trunk/lib/App/SD/Replica/hm/PushEncoder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/hm/PushEncoder.pm	(original)
+++ sd/trunk/lib/App/SD/Replica/hm/PushEncoder.pm	Tue Oct 14 23:34:37 2008
@@ -82,7 +82,23 @@
 }
 
 sub integrate_comment {
-    warn "comment not implemented yet";
+    my $self = shift;
+    my ($change, $changeset) = validate_pos( @_, { isa => 'Prophet::Change' }, {isa => 'Prophet::ChangeSet'} );
+    use Data::Dumper;
+
+    print STDERR Dumper [$change, $changeset];
+
+    my %props = map { $_->name => $_->new_value } $change->prop_changes;
+
+    # XXX, TODO, FIXME: $props{'ticket'} is a luid. is it ok?
+    my $ticket_id = $self->sync_source->remote_id_for_uuid( $props{'ticket'} )
+        or die "Couldn't remote id of sd ticket $props{'ticket'}";
+    my $hm = $self->sync_source->hm;
+    use Data::Dumper;
+    print STDERR Dumper [ $hm->act( 'CreateTaskEmail',
+        task_id => $ticket_id,
+        message => $props{'content'},
+    ) ];
 }
 
 sub integrate_ticket_update {



More information about the Bps-public-commit mailing list