[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.122, 1.123

Erik Levinson levinse at wavetail.420.am
Thu Dec 23 09:52:23 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv18778/FS/FS/ClientAPI

Modified Files:
	MyAccount.pm 
Log Message:
self-service improvements, RT10883

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -w -d -r1.122 -r1.123
--- MyAccount.pm	21 Dec 2010 23:44:54 -0000	1.122
+++ MyAccount.pm	23 Dec 2010 17:52:20 -0000	1.123
@@ -1957,16 +1957,24 @@
 # 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 {



More information about the freeside-commits mailing list