1 # Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
3 # This work is made available to you under the terms of Version 2 of
4 # the GNU General Public License. A copy of that license should have
5 # been provided with this software, but in any event can be snarfed
8 # This work is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
15 RT::Interface::Web_Vendor
21 Freeside vendor overlay for RT::Interface::Web.
25 use_ok(RT::Interface::Web_Vendor);
31 #package RT::Interface::Web;
34 package HTML::Mason::Commands;
37 =head2 ProcessTicketCustomers
41 sub ProcessTicketCustomers {
49 my $Ticket = $args{'TicketObj'};
50 my $ARGSRef = $args{'ARGSRef'};
52 ### false laziness w/RT::Interface::Web::ProcessTicketLinks
53 # Delete links that are gone gone gone.
54 foreach my $arg ( keys %$ARGSRef ) {
55 if ( $arg =~ /DeleteLink-(.*?)-(DependsOn|MemberOf|RefersTo)-(.*)$/ ) {
61 "Trying to delete: Base: $base Target: $target Type $type";
62 my ( $val, $msg ) = $Ticket->DeleteLink( Base => $base,
74 map { /^Ticket-AddCustomer-(\d+)$/; $1 }
75 grep { /^Ticket-AddCustomer-(\d+)$/ && $ARGSRef->{$_} }
78 my @custnums = map { /^Ticket-AddCustomer-(\d+)$/; $1 }
79 grep { /^Ticket-AddCustomer-(\d+)$/ && $ARGSRef->{$_} }
82 foreach my $custnum ( @custnums ) {
84 $Ticket->AddLink( 'Type' => 'MemberOf',
85 'Target' => "freeside://freeside/cust_main/$custnum",