Sort by Last Update - OTRS 3.0.1

Moderator: crythias

Post Reply
deepak50
Znuny newbie
Posts: 1
Joined: 08 Mar 2011, 11:20
Znuny Version: 3.01

Sort by Last Update - OTRS 3.0.1

Post by deepak50 »

We recently upgraded from 2.4.7 to 3.0.1 and find that the option of sorting tickets by 'lastupdate' does not exist in 3.0.1. Could anyone help us with pointers in doing this?

The yellow star for unread mails does not help us - since this only indicates whether a mails has been read or not.

We would like the queue and dashboard views to be sorted so that tickets with the most recent activity appear at the top of the view, the same way as in 2.4.7 using the Ticket::Frontend::AgentTicketQueue###SortBy::Default: 'LastUpdated' parameter.

Many thanks

Deepak
vkandersv
Znuny newbie
Posts: 36
Joined: 07 Mar 2011, 18:32
Znuny Version: 3.0.6

Re: Sort by Last Update - OTRS 3.0.1

Post by vkandersv »

We have same problem
--
ORTS 3.0.6, Linux, MySQL, ActiveDirectory integration for Customer.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Sort by Last Update - OTRS 3.0.1

Post by jojo »

there is no such option
"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
vkandersv
Znuny newbie
Posts: 36
Joined: 07 Mar 2011, 18:32
Znuny Version: 3.0.6

Re: Sort by Last Update - OTRS 3.0.1

Post by vkandersv »

cool
--
ORTS 3.0.6, Linux, MySQL, ActiveDirectory integration for Customer.
manu-2
Znuny newbie
Posts: 4
Joined: 11 Apr 2011, 10:15
Znuny Version: 3

Re: Sort by Last Update - OTRS 3.0.1

Post by manu-2 »

hi...

does anyone has a solution for this problem?
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sort by Last Update - OTRS 3.0.1

Post by Daniel Obee »

Hi.

Attached you'll find an opm package that offers queue sorting by last customer contact. The documentation includes an overview when exactly the timestamp for sorting is updated - you will notice it's a little more complicated than just "Last Update".

Basically the sorting takes care that a new contact is treated as such even when re-opening an old ticket.

The module was once written by xxx for us. I ported it to 3.0 framework because I knew someone would need it :)

Greets & have fun
Daniel
You do not have the required permissions to view the files attached to this post.
manu-2
Znuny newbie
Posts: 4
Joined: 11 Apr 2011, 10:15
Znuny Version: 3

Re: Sort by Last Update - OTRS 3.0.1

Post by manu-2 »

hi thanks...

but for this i have to use Freetime1 - i want to use change_time... so that i can see in my dashboard all tickets sortet by change time...
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sort by Last Update - OTRS 3.0.1

Post by Daniel Obee »

You can sort tickets in the dashboard by FreeTime too. Go to Ticket -> Frontend::Agent::Dashboard and change the "Attributes" of the Dashboard Modules:

Code: Select all

StateType=new;SortBy=TicketFreeTime1;OrderBy=Up;
I found it particular usefull to display open and new ticket in one dashlet, so I added two StateTypes:

Code: Select all

StateType=new;StateType=open;SortBy=TicketFreeTime1;OrderBy=Up;
Greets
Dan
manu-2
Znuny newbie
Posts: 4
Joined: 11 Apr 2011, 10:15
Znuny Version: 3

Re: Sort by Last Update - OTRS 3.0.1

Post by manu-2 »

this i already found... but how can i put the change time of the ticket to the TicketFreeTime1? or can i put the ticket change_time table ticket to this filter?
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sort by Last Update - OTRS 3.0.1

Post by Daniel Obee »

Did you run the updatelastcustomercontact.pl ?
manu-2
Znuny newbie
Posts: 4
Joined: 11 Apr 2011, 10:15
Znuny Version: 3

Re: Sort by Last Update - OTRS 3.0.1

Post by manu-2 »

no not really... how can i runs this? what does this file do?
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sort by Last Update - OTRS 3.0.1

Post by Daniel Obee »

The file extracts the last customer contact of each open ticket and writes it into the FreeTime field. This guarantees that currently open tickets get included in the new sorting.

The file should be run in the bash/shell on the server. You might wanna try this on a test-system or at least make a backup of your db first. I don't see where it would do any harm but then again it's never very intelligent to trust someone in an online forum ;)

Greets
Dan
kevinpattison
Znuny newbie
Posts: 32
Joined: 22 Sep 2011, 16:32
Znuny Version: 5.0.16
Real Name: Kevin Pattison

Re: Sort by Last Update - OTRS 3.0.1

Post by kevinpattison »

Dan,

Thanks a million for this, very useful! Can I mention something about the included PDF? The Sysconfig setting names a re a little out of date. It also doesn't mention in the Installation section that you have to manually run the .pl file via the console. It's an excellent package though.

Kevin
Post Reply