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

sartak at bestpractical.com sartak at bestpractical.com
Sat Aug 9 15:00:49 EDT 2008


Author: sartak
Date: Sat Aug  9 15:00:49 2008
New Revision: 14952

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

Log:
 r69020 at onn:  sartak | 2008-08-09 15:00:44 -0400
 Implicitly hide closed tickets in ticket list


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:00:49 2008
@@ -19,6 +19,21 @@
     }
 };
 
+# implicit status != closed
+before get_search_callback => sub {
+    my $self = 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',
+        });
+    }
+};
+
 __PACKAGE__->meta->make_immutable;
 no Moose;
 



More information about the Bps-public-commit mailing list