Hi,

We have a problem with the module AgentCustomer : it permits to change the
customer of a ticket and it shows all tickets for the current customer.
The problem is that there is no limit (default is 10000) and it could take
a very long time  before we can see the result.

After looking at source files, I've discover that an option exists in one
case for customer tickets history : AgentCustomerMaxShownCustomerTickets.
The program <OTRS_HOME>/Kernel/Modukes/AgentCustomer.pm try to get this
option which didn't exist (both in Config.pm and Default.pm), but only in
one case of the Tickets search.

So I  added this option in Config.pm :

    # set the limit for customer ticket history
    $Self->{AgentCustomerMaxShownCustomerTickets} = 10;


And I use the same option for the two Tickets search method in
AgentCustomer.pm :
    # --
    # get ticket ids with customer id
    # --
    my @TicketIDs = ();
    if ($TicketCustomerID || $CustomerUserData{UserID}) {
        if ($CustomerUserData{UserID}) {
            my @CustomerIDs = $Self->{CustomerUserObject}->CustomerIDs(User
=> $CustomerUserData{UserID});
            @TicketIDs = $Self->{TicketObject}->TicketSearch(
                Result => 'ARRAY',
                Limit =>
$Self->{ConfigObject}->Get('AgentCustomerMaxShownCustomerTickets') || '40',
                CustomerID => [EMAIL PROTECTED],
                UserID => $Self->{UserID},
                Permission => 'ro',
            );
        }
        elsif ($TicketCustomerID) {
            @TicketIDs = $Self->{TicketObject}->TicketSearch(
                Result => 'ARRAY',
      # ept change -> add option limit
      Limit =>
$Self->{ConfigObject}->Get('AgentCustomerMaxShownCustomerTickets') || '40',
                CustomerID => $TicketCustomerID,
                UserID => $Self->{UserID},
                Permission => 'ro',
            );
        }
    }


The problem is that you will only see the X last tickets for this user.
But, I guess that it's enough to work. (There is no pagination either.)

Do you think you could integrate this in a future version ?


Kind regards.

Pascal Gouttebel


_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support oder Consulting f�r Ihr OTRS System?
=> http://www.otrs.de/

Reply via email to