[Bps-public-commit] r13976 - in sd/trunk: . lib/App/SD/CLI/Command/Ticket
sartak at bestpractical.com
sartak at bestpractical.com
Thu Jul 10 17:58:43 EDT 2008
Author: sartak
Date: Thu Jul 10 17:58:43 2008
New Revision: 13976
Added:
sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm
Removed:
sd/trunk/lib/App/SD/CLI/Command/Details.pm
Modified:
sd/trunk/ (props changed)
Log:
r64094 at onn: sartak | 2008-07-10 17:58:38 -0400
Kill "sd details" and phoenix it with "sd ticket details" with less insanity. Some of the code should be API'd though
Added: sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm
==============================================================================
--- (empty file)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm Thu Jul 10 17:58:43 2008
@@ -0,0 +1,35 @@
+package App::SD::CLI::Command::Ticket::Details;
+use Moose;
+extends 'App::SD::CLI::Command::Ticket::Show';
+
+override run => sub {
+ my $self = shift;
+ my $record = $self->_load_record;
+
+ print "\n=head1 METADATA\n\n";
+ super();
+
+ print "\n=head1 ATTACHMENTS\n\n";
+ my $attachments = App::SD::Collection::Attachment->new(
+ handle => $self->app_handle->handle,
+ );
+ $attachments->matching(sub {
+ shift->prop('ticket') eq $self->uuid ? 1 : 0;
+ });
+ print $_->format_summary . "\n" for $attachments->items;
+
+ print "\n=head1 COMMENTS\n\n";
+ my $comments = App::SD::Collection::Comment->new(
+ handle => $self->app_handle->handle,
+ );
+ $comments->matching(sub {
+ shift->prop('ticket') eq $self->uuid ? 1 : 0;
+ });
+ print $_->prop('content') . "\n" for $comments->items;
+};
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
+1;
+
More information about the Bps-public-commit
mailing list