From: mark Date: Thu, 19 Jan 2012 00:50:14 +0000 (+0000) Subject: RT NonCustomerEmailRegexp option, #15847 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=697df286084b490b9371471ae736337776c248e4 RT NonCustomerEmailRegexp option, #15847 --- diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm index 499505371..b4ca44c96 100644 --- a/rt/etc/RT_Config.pm +++ b/rt/etc/RT_Config.pm @@ -341,6 +341,18 @@ made of multiple email adresses. Set($ValidateUserEmailAddresses, undef); +=item C<$NonCustomerEmailRegexp> + +Normally, when a ticket is linked to a customer, any requestors on that +ticket that didn't previously have customer memberships are linked to +the customer also. C<$NonCustomerEmailRegexp> is a regexp for email +addresses that should I automatically be linked to a customer in +this way. + +=cut + +Set($NonCustomerEmailRegexp, undef); + =item C<@MailPlugins> C<@MailPlugins> is a list of auth plugins for L diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index ae1bc888d..94eea5ade 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -341,6 +341,18 @@ made of multiple email adresses. Set($ValidateUserEmailAddresses, undef); +=item C<$NonCustomerEmailRegexp> + +Normally, when a ticket is linked to a customer, any requestors on that +ticket that didn't previously have customer memberships are linked to +the customer also. C<$NonCustomerEmailRegexp> is a regexp for email +addresses that should I automatically be linked to a customer in +this way. + +=cut + +Set($NonCustomerEmailRegexp, undef); + =item C<@MailPlugins> C<@MailPlugins> is a list of auth plugins for L diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm index 129f69fab..ee8c34b55 100644 --- a/rt/lib/RT/Interface/Web_Vendor.pm +++ b/rt/lib/RT/Interface/Web_Vendor.pm @@ -118,6 +118,14 @@ sub ProcessTicketCustomers { } ### + #remove any declared non-customer addresses + ### + + my $exclude_regexp = RT->Config->Get('NonCustomerEmailRegexp'); + @Requestors = grep { not $_->EmailAddress =~ $exclude_regexp } @Requestors + if defined $exclude_regexp; + + ### #link ticket (and requestors) to customers ###