Customer Page ticket counters

Moderator: crythias

Locked
griffin
Znuny newbie
Posts: 20
Joined: 29 Apr 2015, 19:51
Znuny Version: 3.3.8
Real Name: Marcos

Customer Page ticket counters

Post by griffin »

Hi,
i got a bug reported by a customer. I tried checking out the code and found out that it "seems" ok.

The error is that the states count are not being reflected as seen on the following image:
Image

As you can see there are 3 tickets in state "closed succesful" which dont count to the closed count (which is 0).


So i went searching for where this is done and checked "CustomerTicketOverview.tt" and found nothing of a filter here.
Code involved in tt.
CustomerTicketOverview.tt

Code: Select all

[% RenderBlockStart("FilterHeader") %]
            <li class="[% Data.ClassLI | html %]">
                <a class="[% Data.ClassA | html %]" href="[% Env("Baselink") %]Action=[% Env("Action") %];Subaction=[% Env("Subaction") %];Filter=[% Data.Filter | uri %];SortBy=[% Data.SortBy | uri %];OrderBy=[% Data.OrderBy | uri %];">
                    [% Translate(Data.Name) | html %] ([% Data.Count | html %])
                </a>
            </li>
[% RenderBlockEnd("FilterHeader") %]
Then i checked CustomerTicketOverview.pm and found the following:


CustomerTicketOverview.pm

Code: Select all

    # filter definition
    my %Filters = (
        MyTickets => {
            All => {
                Name   => 'All',
                Prio   => 1000,
                Search => {
                    CustomerUserLoginRaw => $Self->{UserID},
                    OrderBy              => $Self->{OrderBy},
                    SortBy               => $Self->{SortBy},
                    CustomerUserID       => $Self->{UserID},
                    Permission           => 'ro',
                },
            },
            Open => {
                Name   => 'Open',
                Prio   => 1100,
                Search => {
                    CustomerUserLoginRaw => $Self->{UserID},
                    StateType            => 'Open',
                    OrderBy              => $Self->{OrderBy},
                    SortBy               => $Self->{SortBy},
                    CustomerUserID       => $Self->{UserID},
                    Permission           => 'ro',
                },
            },
            Closed => {
                Name   => 'Closed',
                Prio   => 1200,
                Search => {
                    CustomerUserLoginRaw => $Self->{UserID},
                    StateType            => 'Closed',
                    OrderBy              => $Self->{OrderBy},
                    SortBy               => $Self->{SortBy},
                    CustomerUserID       => $Self->{UserID},
                    Permission           => 'ro',
                },
            },
        },
    );
Which means that closed is statetype "Closed" in the database. I went checking
SELECT * FROM otrs.ticket_state_type;

and the ticket state for Succesfuly closed is "closed". Tried wich changing the caps at the beggening and doing a otrs.DeleteCache.pl so as to reflect the changes but nothing happened.

What else could i check so as to enable this?

Also the counter for Open tickets i want to edit it so as to reflect only the "open" or "new" tickets.

Any ideas would be greatly appreciated.

For the record the CustomerTicketOverview.pm has not been modified.
OTRS: 4.0.8
Database: MySQL
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Page ticket counters

Post by crythias »

Check your admin page for States.
If it is in open, it is because the state type is open.
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
griffin
Znuny newbie
Posts: 20
Joined: 29 Apr 2015, 19:51
Znuny Version: 3.3.8
Real Name: Marcos

Re: Customer Page ticket counters

Post by griffin »

thanks!
i searched in admin page for "States" and found a lot of hits.

So i went to Frontend::Customer::TicketOverview, Frontend::Customer, Frontend::Customer::ModuleMetaHead, Frontend::Customer::ModuleRegistration, Frontend::Customer::Preferences but could not find anything of the sort.

Am i searching wrongly?
OTRS: 4.0.8
Database: MySQL
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Page ticket counters

Post by crythias »

griffin wrote:i searched in admin page for "States" and found a lot of hits.
Really? Under Admin, Ticket Settings, there should be only one "States".
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
griffin
Znuny newbie
Posts: 20
Joined: 29 Apr 2015, 19:51
Znuny Version: 3.3.8
Real Name: Marcos

Re: Customer Page ticket counters

Post by griffin »

Ah!
thanks found it.

So checked here and all "closed (un)successful" are marked as type closed and still not counting in the dashboard as it should.

Any idea as to where else check so as to count this correctly?
OTRS: 4.0.8
Database: MySQL
griffin
Znuny newbie
Posts: 20
Joined: 29 Apr 2015, 19:51
Znuny Version: 3.3.8
Real Name: Marcos

Re: Customer Page ticket counters

Post by griffin »

yes, i was looking on the wrong place.

i've got states of type closed. Still the counter does not work.

Any ideas as to how debug this?
OTRS: 4.0.8
Database: MySQL
griffin
Znuny newbie
Posts: 20
Joined: 29 Apr 2015, 19:51
Znuny Version: 3.3.8
Real Name: Marcos

[SOLVED] Customer Page ticket counters

Post by griffin »

ok.
i found the error.
the filter was wrong for Open and closed.

in the end it was in CustomerTicketOverview.pm and has to be as follows:

Code: Select all

    # filter definition
    my %Filters = (
        MyTickets => {
            All => {
                Name   => 'All',
                Prio   => 1000,
                Search => {
                    CustomerUserLoginRaw => $Self->{UserID},
                    OrderBy              => $Self->{OrderBy},
                    SortBy               => $Self->{SortBy},
                    CustomerUserID       => $Self->{UserID},
                    Permission           => 'ro',
                },
            },
            Open => {
                Name   => 'open',
                Prio   => 1100,
                Search => {
                    CustomerUserLoginRaw => $Self->{UserID},
                    StateType            => 'open',
                    OrderBy              => $Self->{OrderBy},
                    SortBy               => $Self->{SortBy},
                    CustomerUserID       => $Self->{UserID},
                    Permission           => 'ro',
                },
            },
            Closed => {
                Name   => 'Closed',
                Prio   => 1200,
                Search => {
                    CustomerUserLoginRaw => $Self->{UserID},
                    StateType            => 'closed',
                    OrderBy              => $Self->{OrderBy},
                    SortBy               => $Self->{SortBy},
                    CustomerUserID       => $Self->{UserID},
                    Permission           => 'ro',
                },
            },
        },
    );
OTRS: 4.0.8
Database: MySQL
Locked