[Bps-public-commit] r15079 - in sd/trunk: .

spang at bestpractical.com spang at bestpractical.com
Tue Aug 12 09:30:44 EDT 2008


Author: spang
Date: Tue Aug 12 09:30:44 2008
New Revision: 15079

Modified:
   sd/trunk/   (props changed)
   sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm

Log:
 r47658 at loki:  spang | 2008-08-04 15:03:36 +0100
 sort comments by created time in ticket details display


Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm	Tue Aug 12 09:30:44 2008
@@ -26,7 +26,9 @@
     $comments->matching(sub {
         shift->prop('ticket') eq $self->uuid ? 1 : 0;
     });
-    print $_->prop('content') . "\n" for $comments->items;
+    my @items = sort { $a->prop('created') cmp $b->prop('created') }
+                    $comments->items;
+    print $_->prop('created') . "\n" . $_->prop('content') . "\n\n" for @items;
 };
 
 __PACKAGE__->meta->make_immutable;



More information about the Bps-public-commit mailing list