Empty queues and/or visible queues

Moderator: crythias

Post Reply
Duff
Znuny newbie
Posts: 5
Joined: 24 Oct 2011, 19:07
Znuny Version: 3.0.7
Real Name: Ryan

Empty queues and/or visible queues

Post by Duff »

I have seen this question asked a few times on other forums but I have never seen it answered with any certainty.

Is it possible to see a queue even if it's empty? Ideally, I'd like to see at the top of the queue view:
QueueA (0) QueueB (0) etc...

There are a few legitimate reasons for wanting this that I won't go into, but it is possible at all? Apologies if this was answered, I did a few searches with no hits.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Empty queues and/or visible queues

Post by jojo »

this is not possible via configuration
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Duff
Znuny newbie
Posts: 5
Joined: 24 Oct 2011, 19:07
Znuny Version: 3.0.7
Real Name: Ryan

Re: Empty queues and/or visible queues

Post by Duff »

Is it possible another way?
pakirby
Znuny newbie
Posts: 32
Joined: 10 Nov 2011, 23:21
Znuny Version: 3.2.1
Real Name: Patrick
Company: MAM

Re: Empty queues and/or visible queues

Post by pakirby »

I am also looking for a way to accomplish this. Upon reviewing the source code of a live OTRS environment, this appears to be controlled by the following:

Code: Select all

<div class="WidgetSimple QueueOverview">
<div class="Content">
<ul class="QueueOverviewList">
And then from there it lists out each queue with appropriate links.

Even beyond being able to see an empty queue, the queue vanishes from the overview even if there are tickets in it but all tickets are currently locked. This is problematic because our supervisors act as a distributor for certain queues. After assigning the ticket, supervisors keep an eye on it until the ticket is closed. If all tickets are assigned in the given queue, it is not available to select from the overview. There should be a way to select a queue that has only locked tickets in it.

I understand this is not available within SysConfig, but what about editing the Widget itself which appears to filter by 'Unlocked', changing it to filter by 'All'. I would like to give this a try, but cannot seem to find where this widget lives in OTRS.
OTRS 3.2.1
CentOs 5.7
MySQL
Sid
Znuny newbie
Posts: 27
Joined: 27 Aug 2007, 13:50

Re: Empty queues and/or visible queues

Post by Sid »

I had the same problem here.
To solve it I changed the related SQL query in Kernel/System/Ticket/IndexAccelerator/RuntimeDB.pm line 141ff

Code: Select all

 # prepare the tickets in Queue bar (all data only with my/your Permission)
    return if !$Self->{DBObject}->Prepare(
        
# old standard SQL query
#SQL => "SELECT st.queue_id, sq.name, min(st.create_time_unix), count(*) FROM "
#            . " ticket st, queue sq WHERE "
#            . " st.ticket_state_id IN ( ${\(join ', ', @ViewableStateIDs)} ) AND "
#            . " st.ticket_lock_id IN ( ${\(join ', ', @ViewableLockIDs)} ) AND "
#            . " st.queue_id = sq.id AND "
#            . " sq.group_id IN ( ${\(join ', ', @GroupIDs)} ) "
#            . " GROUP BY st.queue_id,sq.name "
#            . " ORDER BY sq.name",

	SQL => "SELECT sq.id, sq.name, tmp.mintime, tmp.count FROM queue sq LEFT JOIN "
		." (SELECT st.queue_id, COUNT(*) AS count, MIN(st.create_time_unix) AS mintime "
		." FROM ticket st WHERE st.ticket_lock_id IN ( ${\(join ', ', @ViewableLockIDs)} ) AND "
		." st.ticket_state_id IN ( ${\(join ', ', @ViewableStateIDs)} ) "
		." GROUP BY st.queue_id) AS tmp "
		." ON sq.id = tmp.queue_id "
		." WHERE sq.group_id IN ( ${\(join ', ', @GroupIDs)} ) "
		." ORDER BY sq.name",
	);
This shows empty queue links then in the queue view without the need to set locked tickets as viewable which would create some other problems (Available Ticket count == all Tickets then and locked tickets shown on dashboard)
shostakovich
Znuny advanced
Posts: 146
Joined: 11 Apr 2011, 08:11
Znuny Version: 3.2.5

Re: Empty queues and/or visible queues

Post by shostakovich »

Does not work here. 3.08. Upon entering the queue view:
Software error:

Can't use an undefined value as an ARRAY reference at /usr/local/otrs/Custom/Kernel/Modules/AgentTicketQueue.pm line 319.

For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.
Post Reply