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

sartak at bestpractical.com sartak at bestpractical.com
Sat Aug 9 15:41:50 EDT 2008


Author: sartak
Date: Sat Aug  9 15:41:49 2008
New Revision: 14955

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

Log:
 r69026 at onn:  sartak | 2008-08-09 15:41:42 -0400
 Implicit default of status != closed


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	Sat Aug  9 15:41:49 2008
@@ -20,19 +20,13 @@
 };
 
 # implicit status != closed
-before get_search_callback => sub {
+sub default_match {
     my $self = shift;
+    my $ticket = shift;
 
-    # if they specify a specific status then don't limit on status
-    # or, if they specify --all, then don't limit on status
-    unless ($self->has_prop('status') || $self->has_arg('all')) {
-        $self->add_to_prop_set({
-            prop  => 'status',
-            cmp   => '!=',
-            value => 'closed',
-        });
-    }
-};
+    return 0 if $ticket->prop('status') eq 'closed';
+    return 1;
+}
 
 __PACKAGE__->meta->make_immutable;
 no Moose;



More information about the Bps-public-commit mailing list