[SOLVED] OpenTickets link in AgentTicketZoom reports Company Tickets

Moderator: crythias

Post Reply
tzarot
Znuny newbie
Posts: 13
Joined: 20 Oct 2014, 20:08
Znuny Version: 3.3.9
Real Name: Themis Zarotiadis

[SOLVED] OpenTickets link in AgentTicketZoom reports Company Tickets

Post by tzarot »

Hello to everyone,

I am trying to make OTRS to report correct number of tickets per CustomerUser since I use the CustomerCompany grouping CustomerUsers logic.
Though I have managed to achieve this, (thanks to what I have read in viewtopic.php?t=10110) it is only done regarding the list of tickets presented at the bottom in e.g. a new phone ticket screen, by changing
AgentCustomerSearch.pm (overriding to be correct) and specifically the array:

@ViewableTickets = $Self->{TicketObject}->TicketSearch(
Result => 'ARRAY',
Limit => 250,
SortBy => [$SortBy],
OrderBy => [$OrderBy],
CustomerID => \@CustomerIDsEscaped,
CustomerUserLogin => $CustomerUserID, # Changed to show list of CustomerUser tickets
UserID => $Self->{UserID},
Permission => 'ro',
);

the link "Open Tickets" link shown in the right side of the screen or even the AgentTicketZoom screen reports the number of CustomerCompany tickets. I am trying to find the code that generates the link and the number reported to change it.
opentickets_link.png
Can anybody help?

Thanks in advance.
Greetings...
You do not have the required permissions to view the files attached to this post.
Last edited by tzarot on 10 Dec 2014, 20:42, edited 1 time in total.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OpenTickets link in AgentTicketZoom reports Company Tickets

Post by crythias »

AgentDashboardCustomerIDStatus.dtl
dtl:block:ContentSmallCustomerIDStatusOpenTickets
Output/HTML/DashboardCustomerIDStatus.pm

Code: Select all

    $Count = $Self->{TicketObject}->TicketSearch(
        StateType  => 'Open',
        CustomerID => $CustomerIDSQL,
        Result     => 'COUNT',
        Permission => $Self->{Config}->{Permission},
        UserID     => $Self->{UserID},
        CacheTTL   => $Self->{Config}->{CacheTTLLocal} * 60,
    );
Summary: count of open tickets that the current user has access to see. versus cache'd values.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
tzarot
Znuny newbie
Posts: 13
Joined: 20 Oct 2014, 20:08
Znuny Version: 3.3.9
Real Name: Themis Zarotiadis

SOLVED: OpenTickets link in AgentTicketZoom reports Company Tickets

Post by tzarot »

Solved. By pure luck I stumbled on the solution:

The article http://permalink.gmane.org/gmane.comp.otrs.cvs/48243 gave me an idea. Lets search for CustomerUserLogin in Sysconfig and see if it is 1. The article said that 1 would make the system to search by CustomerUserLogin.

In SysConfig in Frontend::Customer I found Frontend::CustomerUser::Item###15-OpenTickets and in the contained list of entries there was one CustomerUserLogin = 0. Changed it to CustomerUserLogin = 1 and everything worked as I expected. No in AgentTicketZoom and also in New Ticket screens as soon as I choose a CustomerUser I see the correct number of his/her open tickets.
new_open.PNG
I have to say it seemed little awkward in the beginning because I am used to think that Customer relates to Customer Portal only.

Thanks for reading.
You do not have the required permissions to view the files attached to this post.
tzarot
Znuny newbie
Posts: 13
Joined: 20 Oct 2014, 20:08
Znuny Version: 3.3.9
Real Name: Themis Zarotiadis

Re: OpenTickets link in AgentTicketZoom reports Company Tickets

Post by tzarot »

Thank you crythias. Yesterday while searching I greped both the specific files while looking for CustomerUser relevant keywords. But unfortunately I could not figure out how to use the settings. Thanks indeed for the additional info. I am trying it right now...
Post Reply