[Solved] No Closed Ticket in Status View

Moderator: crythias

Locked
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

[Solved] No Closed Ticket in Status View

Post by stevechan »

There are zero tickets in the status view. I tried to close a ticket and the closed ticket will count on the Open tickets. Attachment is the screen capture of the status view. Is there anyway I can find a problem?? Or how to solve it. Thanks

zeroticket.png
You do not have the required permissions to view the files attached to this post.
Last edited by stevechan on 05 Mar 2020, 04:21, edited 1 time in total.
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: No Closed Ticket in Status View

Post by wurzel »

Hi,

Show your states and state types, please.
Did you change anything there?

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hi wurzel,

I didn't make any changes as I attached the setting of State Management.
closed successful is under closed type as you can see.
Thanks
setting.PNG
You do not have the required permissions to view the files attached to this post.
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: No Closed Ticket in Status View

Post by wurzel »

Hi,

actually you changed something in merged ;-)

The closed states seem to be correct.

then you have to check your status view settings in sysconfig.
Maybe there is something changed?

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hi,

I have gone through the sysconfig by searching "StatusView" and none of them seem related to State Type.
May you please suggest some hints for me to find out??

Thanks
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: No Closed Ticket in Status View

Post by wurzel »

Hi,

you are right. I did not find anything related to it.
Maybe one of developpers may tell us, if it is hardcoded?

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hi,

Thanks for your help. Hope others may help me out. Or are there other factors that may affect Status View??
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: No Closed Ticket in Status View

Post by wurzel »

Hi,

wrong queuevjews and dashboard can be result of wrong caches. Is the daemon running? Are the caches deleted on a regular base?

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hi,

I run /opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete command. It does not work in my situation. Problem still exits.
Thanks for your advise
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hi guys,

I go to the AgentTicketStatusView.pm and made the following changes (Closed -> closed).
Closed => {
Name => Translatable('Closed tickets'),
Prio => 1001,
Search => {
StateType => 'closed',
OrderBy => $OrderBy,
SortBy => $SortBy,
UserID => $Self->{UserID},
Permission => 'ro',
},
},

Status view can show the closed ticket in the Closed tickets column now. However, the closed ticket still counted and view-able in the Open tickets Column. Any idea about it.
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Here is the screen capture for your reference
zeroticket.png
You do not have the required permissions to view the files attached to this post.
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: No Closed Ticket in Status View

Post by zzz »

Hey,

It's correct that the state closed is written lowercase, but you should check the code of the subroutine that's getting called.

https://github.com/OTRS/otrs/blob/rel-6 ... ch.pm#L719

Code: Select all

    # current ticket state type
    # NOTE: Open and Closed are not valid state types. It's for compat.
    # Open   -> All states which are grouped as open (new, open, pending, ...)
    # Closed -> All states which are grouped as closed (closed successful, closed unsuccessful)
    if ( $Param{StateType} && $Param{StateType} eq 'Open' ) {
        my @ViewableStateIDs = $Kernel::OM->Get('Kernel::System::State')->StateGetStatesByType(
            Type   => 'Viewable',
            Result => 'ID',
        );
        $SQLExt .= " AND st.ticket_state_id IN ( ${\(join ', ', sort @ViewableStateIDs)} ) ";
    }
    elsif ( $Param{StateType} && $Param{StateType} eq 'Closed' ) {
        my @ViewableStateIDs = $Kernel::OM->Get('Kernel::System::State')->StateGetStatesByType(
            Type   => 'Viewable',
            Result => 'ID',
        );
        $SQLExt .= " AND st.ticket_state_id NOT IN ( ${\(join ', ', sort @ViewableStateIDs)} ) ";
    }
Have you made other changes to the code or the database, especially regarding states and state types? Definitely not a normal behavior.

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hi,

Sorry for the late replying. I just got a question. Will the issue related to the setting of Ticket::ViewableStateType??
I saw its definition and it is more likely to be root cause.
The default value of it should be
---
- new
- open
- pending reminder
- pending auto

However, my setting is
---
- new
- open
- pending reminder
- pending auto
- closed

I deleted the closed from my setting and deployed. It has no effect on the status view. Am I wrong about that?
stevechan
Znuny newbie
Posts: 25
Joined: 02 Jan 2020, 05:15
Znuny Version: 6.0.4
Real Name: Steve Chan

Re: No Closed Ticket in Status View

Post by stevechan »

Hey guys,

Thanks for everyone that try to help me. The problem is solved!!!! Lets provide my solution for this issue.
setting.PNG
The issue is related to the setting of Ticket::ViewableStateType.
The status view now work normally after I delete the cache.
You do not have the required permissions to view the files attached to this post.
Locked