diff options
author | levinse <levinse> | 2010-12-23 17:52:23 +0000 |
---|---|---|
committer | levinse <levinse> | 2010-12-23 17:52:23 +0000 |
commit | 9958556555ea7af329e6602937c1fa9d2483ddf4 (patch) | |
tree | e02b8edafeec72533346ba3a838b0fcc4c11e39d | |
parent | f8c64fa8aa8ff91829ea239b9cba5ad9e5f453ae (diff) |
self-service improvements, RT10883
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 10 | ||||
-rw-r--r-- | FS/FS/TicketSystem/RT_Internal.pm | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 9c7c753a7..8859f22dd 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -1941,16 +1941,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; } |