From b748d0884d194ec36fe10fbcc3f2f6322c4c0490 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 4 Mar 2011 02:26:27 +0000 Subject: option to override requestor in new tickets, #7777 --- FS/FS/Conf.pm | 7 +++++++ FS/FS/TicketSystem/RT_External.pm | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'FS') diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index f75f268c1..6856ccf7e 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2553,6 +2553,13 @@ and customer address. Include units.', }, }, + { + 'key' => 'ticket_system-requestor', + 'section' => '', + 'description' => 'Email address to use as the requestor for new tickets. If blank, the customer\'s invoicing address(es) will be used.', + 'type' => 'text', + }, + { 'key' => 'ticket_system-priority_reverse', 'section' => '', diff --git a/FS/FS/TicketSystem/RT_External.pm b/FS/FS/TicketSystem/RT_External.pm index 2995b88a4..8a8c3ffb4 100644 --- a/FS/FS/TicketSystem/RT_External.pm +++ b/FS/FS/TicketSystem/RT_External.pm @@ -285,6 +285,12 @@ sub href_params_new_ticket { $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); } + # explicit $requestors > config option > invoicing_list + $requestors = $conf->config('ticket_system-requestor') + if !$requestors; + $requestors = $cust_main->invoicing_list_emailonly_scalar + if (!$requestors) and defined($cust_main); + my %param = ( 'Queue' => ($cust_main->agent->ticketing_queueid || $default_queueid), 'new-MemberOf'=> "freeside://freeside/cust_main/$custnum", -- cgit v1.2.1