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

spang at bestpractical.com spang at bestpractical.com
Fri Jan 9 07:49:48 EST 2009


Author: spang
Date: Fri Jan  9 07:49:46 2009
New Revision: 17670

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

Log:
 r53457 at loki:  spang | 2009-01-09 14:21:01 +0200
 don't sort/group if the sort/group args are empty (supposed to specify a prop to sort/group by)


Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm	Fri Jan  9 07:49:46 2009
@@ -22,11 +22,10 @@
               $self->app_handle->config->get('default_group_ticket_list') );
     }
 
-    # sort output by created date if user specifies --sort
-    if ( $self->has_arg('sort') && ( $self->arg('sort') ne 'none' ) ) {
+    # sort output by given prop if user specifies --sort
+    if ( $self->has_arg('sort') && $self->arg('sort')
+            && ( $self->arg('sort') ne 'none' ) ) {
 
-        # some records might not have creation dates
-        no warnings 'uninitialized';
         $self->sort_routine(
             sub {
                 my $records = shift;
@@ -35,7 +34,8 @@
         );
     }
 
-    if ( $self->has_arg('group') && ( $self->arg('group') ne 'none' ) ) {
+    if ( $self->has_arg('group') && $self->arg('group') && (
+            $self->arg('group') ne 'none' ) ) {
         $self->group_routine(
             sub {
                 my $records = shift;



More information about the Bps-public-commit mailing list