Automated Unlocking doesnt work for me

Moderator: crythias

Locked
hoberion
Znuny newbie
Posts: 20
Joined: 25 Aug 2010, 09:07
Znuny Version: 3 beta 2

Automated Unlocking doesnt work for me

Post by hoberion »

Followed http://doc.otrs.org/3.0/en/html/x2168.html and searched on the forum but nothing solves my issue

I have done the following:

Code: Select all

Unlock timeout minutes: 1
* * * * *  $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/null
ticket status are open and lock

but even manually executing the script (also with --all) doesnt work
has also no output (run as user otrs):

Code: Select all

$ $HOME/bin/otrs.UnlockTickets.pl --all
otrs.UnlockTickets.pl <Revision 1.7> - unlock tickets
Copyright (C) 2001-2010 xxx, http://otrs.org/
 Unlock all tickets:
lamp, OTRS 3.0.latest:ITSM 3.latest (keeping up to date)
AD link to customers and agents
hoberion
Znuny newbie
Posts: 20
Joined: 25 Aug 2010, 09:07
Znuny Version: 3 beta 2

Re: Automated Unlocking doesnt work for me

Post by hoberion »

Noticed this behaviour also on my other (older: OTRS 3.0.5) otrs installation

running on Ubuntu 10.04.2 LTS
lamp, OTRS 3.0.latest:ITSM 3.latest (keeping up to date)
AD link to customers and agents
hoberion
Znuny newbie
Posts: 20
Joined: 25 Aug 2010, 09:07
Znuny Version: 3 beta 2

Re: Automated Unlocking doesnt work for me

Post by hoberion »

since its not working is it possible to disable the locking entirely?
lamp, OTRS 3.0.latest:ITSM 3.latest (keeping up to date)
AD link to customers and agents
hoberion
Znuny newbie
Posts: 20
Joined: 25 Aug 2010, 09:07
Znuny Version: 3 beta 2

Re: Automated Unlocking doesnt work for me

Post by hoberion »

anyone? did I post this in the wrong forum?
lamp, OTRS 3.0.latest:ITSM 3.latest (keeping up to date)
AD link to customers and agents
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Automated Unlocking doesnt work for me

Post by crythias »

No, you didn't post on the wrong forum, but there's not much to reply to. It's either you not doing something correctly, or there's a bug, but in either case, it's apparently not an issue for anyone who visits the forums. Are you also saying that nothing appears in System Log when you run the unlock.pl manually? Because I'd really hope that if it did anything, it would log that it happened.
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
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Automated Unlocking doesnt work for me

Post by MichaelR »

If you feel that locking is inappropriate you can disable it entirely.

Although it does require a fair amount of code changes to stop all the automatic locking.
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
renee
Znuny expert
Posts: 241
Joined: 06 Feb 2009, 11:15
Znuny Version: 3.0.x
Company: Perl-Services.de
Contact:

Re: Automated Unlocking doesnt work for me

Post by renee »

You could write an event handler for the TicketLockUpdate event and unlock the ticket (don't forget to "exit" if the ticket is already unlocked to avoid infinite loops).
Need a Perl/OTRS developer? You can contact me at info@perl-services.de
renee
Znuny expert
Posts: 241
Joined: 06 Feb 2009, 11:15
Znuny Version: 3.0.x
Company: Perl-Services.de
Contact:

Re: Automated Unlocking doesnt work for me

Post by renee »

BTW: There is already an event module that you can use: Kernel::System::Ticket::Event::ForceUnlock. You just have to change the events, this module listens to. In the SysConfig at "Ticket -> Core::Ticket" you can find "Ticket::EventModulePost###910-ForceUnlockOnMove". There you have to change the event from TicketQueueUpdate to TicketLockUpdate.

You have to check if this ends in an infinite loop. To avoid this, you can edit Kernel/System/Ticket/Event/ForceUnlock.pm and add

Code: Select all

    my %TicketData = $Self->{TicketObject}->TicketGet(
        TicketID => $Param{Data}->{TicketID},
    );

    return if $TicketData{Lock} eq 'unlock';
right before TicketLockSet is called...

You should disable the "lock" link in the ticket menu to avoid confusion ("Hey, I clicked 'lock' but the ticket is still unlocked!").
Need a Perl/OTRS developer? You can contact me at info@perl-services.de
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Automated Unlocking doesnt work for me

Post by MichaelR »

Yeah, I have gone through and systematically removed all references to 'lock' anywhere.
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
hoberion
Znuny newbie
Posts: 20
Joined: 25 Aug 2010, 09:07
Znuny Version: 3 beta 2

Re: Automated Unlocking doesnt work for me

Post by hoberion »

did the same to prevent auto locking


"Just wanted to add in a little thing, u can actually disable the Locking
feature, by simply changing all "RequiredLock" in all necessary settings to
No instead of the default Yes."

http://lists.otrs.org/pipermail/otrs/20 ... 35435.html
lamp, OTRS 3.0.latest:ITSM 3.latest (keeping up to date)
AD link to customers and agents
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Automated Unlocking doesnt work for me

Post by MichaelR »

Then you still get the issue of owner updates locking the ticket. I think there are a few other cases where the ticket will lock.
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
Locked