otrs.UnlockTickets.pl does not work for me

Moderator: crythias

Locked
konstanta
Znuny newbie
Posts: 4
Joined: 05 Feb 2013, 14:45
Znuny Version: 3.2.1
Real Name: Kostya
Company: OHT

otrs.UnlockTickets.pl does not work for me

Post by konstanta »

When I trying to run it with --all or --timeout args:

Code: Select all

root@otrs:/opt/otrs# bin/otrs.UnlockTickets.pl --timeout
otrs.UnlockTickets.pl <Revision 1.14> - unlock tickets
Copyright (C) 2001-2013 xxx, http://otrs.org/
 Unlock old tickets:

root@otrs:/opt/otrs# bin/otrs.UnlockTickets.pl --all
otrs.UnlockTickets.pl <Revision 1.14> - unlock tickets
Copyright (C) 2001-2013 xxx, http://otrs.org/
 Unlock all tickets:
 
But I have a lot of tickets that they are opened, locked and timeout for queues is set to 1.
Also I set Framework::Core::Time -> working hours - 24/7 , that's how our support works (just saw somewhere that timeout depends on working hours)...

Also tried to run this SQL query from otrs.UnlockTickets.pl script, but without last two lines...received a lot of strings in result:

Code: Select all

SELECT st.tn, st.id, st.timeout, sq.unlock_timeout
            FROM ticket st, queue sq
            WHERE st.queue_id = sq.id
                AND sq.unlock_timeout != 0
                AND st.ticket_state_id IN ( ${\(join ', ', @UnlockStateIDs)} )
                AND st.ticket_lock_id NOT IN ( ${\(join ', ', @ViewableLockIDs)} ) ",
Can someone give me appropriate values for

Code: Select all

( ${\(join ', ', @UnlockStateIDs)} )
and

Code: Select all

( ${\(join ', ', @UnlockStateIDs)} )
just whant to try run this query in MySQL to check the results.
Thanks.
OTRS 3.2.1
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: otrs.UnlockTickets.pl does not work for me

Post by crythias »

from the same file:

Code: Select all

my @UnlockStateIDs = $CommonObject{StateObject}->StateGetStatesByType(
    Type   => 'Unlock',
    Result => 'ID',
);
my @ViewableLockIDs = $CommonObject{LockObject}->LockViewableLock( Type => 'ID' );
SysConfig:

Code: Select all

$Self->{'Ticket::UnlockStateType'} =  [
  'new',
  'open'
];
$Self->{'Ticket::ViewableLocks'} =  [
  '\'unlock\'',
  '\'tmp_lock\''
];

If these have been relabeled somehow, adjust either side.
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
Locked