[Bps-public-commit] r10198 - in RT-Client-Console: trunk/lib/RT/Client/Console/Session/Ticket
dams at bestpractical.com
dams at bestpractical.com
Sun Dec 30 11:40:03 EST 2007
Author: dams
Date: Sun Dec 30 11:40:02 2007
New Revision: 10198
Modified:
RT-Client-Console/ (props changed)
RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm
Log:
r38 at pundit: dams | 2007-12-30 16:38:49 +0000
switch to transactions to display ticket content
Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm (original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm Sun Dec 30 11:40:02 2007
@@ -217,9 +217,43 @@
use Data::Dumper;
my $s = Dumper($transaction);
+# use RT::Client::Console::Session::Ticket;
+# my $ticket = RT::Client::Console::Session::Ticket->get_current_ticket();
+# my $attachments_obj = $ticket->attachments();
+# my $iterator = $attachments_obj->get_iterator();
+# my $linked_attachement;
+# while (my $attachment = $iterator->()) {
+# if ($attachment->transaction_id() == $transaction->id()) {
+# $linked_attachement = $attachment;
+# last;
+# }
+# }
+
my $text =
+ 'id : {' . $transaction->id() . "}\n" .
+ 'creator : {' . $transaction->creator() . "}\n" .
+ 'parent_id: {' . $transaction->parent_id() . "}\n" .
+ 'type : {' . $transaction->type() . "}\n" .
+ 'old_value: {' . $transaction->old_value() . "}\n" .
+ 'new_value: {' . $transaction->new_value() . "}\n" .
+ 'attach : {' . $transaction->attachments() . "}\n" .
+ 'data : {' . $transaction->data() . "}\n" .
$transaction->description() . "\n\n" .
$transaction->content();
+
+# if ($linked_attachement) {
+# my $attachment = $linked_attachement;
+# $text .=
+# "\n CC : " . $attachment->content_type() .
+# "\n subject : " . $attachment->subject() .
+# "\n filename : " . $attachment->file_name();
+# if ($attachment->content_type eq 'text/plain') {
+# $text .= "\n content : [" . $attachment->content() . "]";
+# } elsif ($attachment->content_type eq 'multipart/mixed') {
+# $text .= "\n content : [" . $attachment->content() . "]";
+# }
+# }
+
$heap->{text}[$idx] = $text;
my @lines = textwrap($text, $width - 1);
my $i = 0;
More information about the Bps-public-commit
mailing list