[Bps-public-commit] r10405 - in Net-Hiveminder: lib/Net

sartak at bestpractical.com sartak at bestpractical.com
Mon Jan 21 01:33:20 EST 2008


Author: sartak
Date: Mon Jan 21 01:33:20 2008
New Revision: 10405

Modified:
   Net-Hiveminder/   (props changed)
   Net-Hiveminder/Changes
   Net-Hiveminder/lib/Net/Hiveminder.pm

Log:
 r50624 at onn:  sartak | 2008-01-21 01:33:17 -0500
 Add a comments_on(task) method


Modified: Net-Hiveminder/Changes
==============================================================================
--- Net-Hiveminder/Changes	(original)
+++ Net-Hiveminder/Changes	Mon Jan 21 01:33:20 2008
@@ -7,6 +7,7 @@
         loc2id can now take task-hashes
         You can pass arguments to braindump. The "tokens" argument must now be
             passed in as a special option (tokens => 'foo')
+        Add comments_on(task) method
 
 0.02    Sat Jan 12 08 22:48:24
         Remove canonicalize_priority, Hiveminder does it for us.

Modified: Net-Hiveminder/lib/Net/Hiveminder.pm
==============================================================================
--- Net-Hiveminder/lib/Net/Hiveminder.pm	(original)
+++ Net-Hiveminder/lib/Net/Hiveminder.pm	Mon Jan 21 01:33:20 2008
@@ -451,6 +451,21 @@
     return wantarray ? @locs : $locs[0];
 }
 
+=head2 comments_on TASK -> (String)s
+
+Returns a list of the comments on the given task.
+
+=cut
+
+sub comments_on {
+    my $self = shift;
+    my $task = $self->loc2id(shift);
+
+    return grep { defined }
+           map { $_->{message} }
+           $self->read('TaskEmail', task_id => $task);
+}
+
 =head1 SEE ALSO
 
 L<Jifty>, L<Net::Jifty>



More information about the Bps-public-commit mailing list