[Bps-public-commit] r16569 - in sd/branches/sd-dispatcher: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Oct 28 13:09:01 EDT 2008


Author: sartak
Date: Tue Oct 28 13:09:00 2008
New Revision: 16569

Modified:
   sd/branches/sd-dispatcher/   (props changed)
   sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm

Log:
 r74675 at onn:  sartak | 2008-10-28 13:08:53 -0400
 Most ticket commands, including an inlined "resolve"


Modified: sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm
==============================================================================
--- sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm	(original)
+++ sd/branches/sd-dispatcher/lib/App/SD/CLI/Dispatcher.pm	Tue Oct 28 13:09:00 2008
@@ -17,6 +17,15 @@
 };
 
 under ticket => sub {
+    on create   => run_command('Ticket::Create');
+    on basics   => run_command('Ticket::Basics');
+    on comments => run_command('Ticket::Comments');
+    on comment  => run_command('Ticket::Comment');
+    on details  => run_command('Ticket::Details');
+    on search   => run_command('Ticket::Search');
+    on show     => run_command('Ticket::Show');
+    on update   => run_command('Ticket::Update');
+
     on ['give', qr/.*/, qr/.*/] => sub {
         my $self = shift;
         $self->context->set_arg(type  => 'ticket');
@@ -25,7 +34,21 @@
         run('update', $self, @_);
     };
 
-    on basics => run_command('Ticket::Basics');
+    on ['resolve', 'close'] => sub {
+        my $self = shift;
+        $self->context->set_prop(status => 'closed');
+        run('ticket update', $self, @_);
+    };
+
+    under comment => sub {
+        on create => run_command('Ticket::Attachment::Create');
+        on update => run_command('Ticket::Attachment::Update');
+    };
+
+    under attachment => sub {
+        on create => run_command('Ticket::Attachment::Create');
+        on search => run_command('Ticket::Attachment::Search');
+    };
 };
 
 # allow type to be specified via primary commands, e.g.



More information about the Bps-public-commit mailing list