
Hi, We were asked, to implement the following and want to give it back to all: Problem: One user sends many requests (Email, web-form, ...), because he thinks, more is better or s.th. like that. The requests become different tickets. If different agents fetch them, they're answered seperately. Thats waste of time and doesn't give the customer a "warm fuzzy feeling". Solution: All Emails sent in the past x minutes (e.g. 1440, 24 hours) from one Email-Adress are followups. we made changes in Kernel/System/PostMaster.pm and Kernel/Config/Defaults.pm. We're new to programming for otrs, maybe one of the expiriences guys want to have a look over the code and give us feedback. Here are the diffs: $> diff --context=5 PostMaster.20050408.pm PostMaster.pm.org *** PostMaster.20050408.pm Fri Apr 8 11:29:30 2005 --- PostMaster.pm.org Fri Apr 8 11:26:42 2005 *************** *** 293,334 **** return ($Tn, $TicketID); } } } } - # was there an Email from same adress, shortly? then make it a followup ticket! - # rh@tuxwerk.de 2005.04.07 - if ($Self->{ConfigObject}->Get('PostmasterFollowUpSearchInEmailAddress')) { - if (!($Self->{ConfigObject}->Get('PostmasterFollowUpSearchInEmailAddressTime'))) { - $Self->{LogObject}->Log( - Priority => 'error', - Message => "No PostmasterFollowUpSearchInEmailAddressTime found!", - ); - return; - } - my $TicketTime = $Self->{ConfigObject}->Get('PostmasterFollowUpSearchInEmailAddressTime'); - my $FromAddress = $Self->{ParseObject}->GetEmailAddress(Email => $Self->{ParseObject}->GetParam(WHAT => 'From')); - my @TicketIDs = $Self->{TicketObject}->TicketSearch( - Limit => 1, - UserID => 1, - Result => 'ARRAY', - From => '%'.$FromAddress.'%', - StateType => 'Open', - TicketCreateTimeNewerMinutes => $TicketTime, - OrderBy => 'Down', - SortBy => 'Age', - ); - my $TicketID = $TicketIDs[0]; - if ($TicketID) { - my $Tn = $Self->{TicketObject}->TicketNumberLookup( - TicketID => $TicketID, - ); - if ($TicketID && $Tn) { - return ($Tn, $TicketID); - } - } - } return; } # -- # GetEmailParams # -- --- 293,302 ---- $> diff --context=5 Defaults.20050408.pm Defaults.pm.org *** Defaults.20050408.pm Fri Apr 8 11:21:40 2005 --- Defaults.pm.org Fri Apr 8 11:21:23 2005 *************** *** 1049,1065 **** # PostmasterFollowUpSearchInReferences # (If no ticket number in subject, otrs also looks in In-Reply-To # and References for follow up checks) $Self->{PostmasterFollowUpSearchInReferences} = 0; - # PostmasterFollowUpSearchInEmailAddress - # if someone sends a request from the same Email Adress, twice, in the - # time PostmasterFollowUpSearchInEmailAddressTime [minutes], it will - # be a followup ticket - $Self->{PostmasterFollowUpSearchInEmailAddress} = 1; - $Self->{PostmasterFollowUpSearchInEmailAddressTime} = 1440; - # PostmasterUserID # (The post master db-uid.) [default: 1] $Self->{PostmasterUserID} = 1; # PostmasterDefaultQueue --- 1049,1058 ---- -- tuxwerk OHG Dipl.-Phys. Rudolf Harney Basler Straße 13 D-79100 Freiburg fon: ++49 (0)761 / 7043067 fax: ++49 (0)761 / 7043066 mobil: ++49 (0)177 / 2858377 web: www.tuxwerk.de mail: rh@tuxwerk.de