summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorlevinse <levinse>2010-12-23 17:52:21 +0000
committerlevinse <levinse>2010-12-23 17:52:21 +0000
commitf73e85ca1d6603f0f3368412a5db66c10db12a3e (patch)
treef392098406e118e021be2181aa437d59e44e8b74 /FS/FS
parentfda372ea3d82601724eb4fd064ba95fbfdd68bdb (diff)
self-service improvements, RT10883
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm10
-rw-r--r--FS/FS/TicketSystem/RT_Internal.pm1
2 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index fb445e555..9a20285d7 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -1957,16 +1957,24 @@ sub get_ticket {
# the requested ticket was actually linked to this customer
my @custs = @{$err_or_ticket->{'custs'}};
my @txns = @{$err_or_ticket->{'txns'}};
+ my @filtered_txns;
return { 'error' => 'no customer' } unless ( $custnum && scalar(@custs) );
return { 'error' => 'invalid ticket requested' }
unless grep($_ eq $custnum, @custs);
+ foreach my $txn ( @txns ) {
+ push @filtered_txns, $txn
+ if ($txn->{'type'} eq 'EmailRecord'
+ || $txn->{'type'} eq 'Correspond'
+ || $txn->{'type'} eq 'Create');
+ }
+
warn "$me get_ticket: sucessful: \n"
if $DEBUG;
return { 'error' => '',
- 'transactions' => \@txns,
+ 'transactions' => \@filtered_txns,
'ticket_id' => $p->{'ticket_id'},
};
} else {
diff --git a/FS/FS/TicketSystem/RT_Internal.pm b/FS/FS/TicketSystem/RT_Internal.pm
index 6fc2bb666..befafb847 100644
--- a/FS/FS/TicketSystem/RT_Internal.pm
+++ b/FS/FS/TicketSystem/RT_Internal.pm
@@ -255,6 +255,7 @@ sub get_ticket {
my $t = { created => $transaction->Created,
content => $transaction->Content,
description => $transaction->Description,
+ type => $transaction->Type,
};
push @txns, $t;
}