
I have made a change in this pm file, In fact i wanted to sort the ticket not by Age, but by the time of creation of the last answer to the customer. If you sort your ticket by age, a very old ticket wich have received a answer only minutes ago can be on top of the list. I didn't want that so i have made this change and would like the change to be include in next version of AgentTicketQueue.pm First I have add a sort option "AGE3" # get data (viewable tickets...) # -- my @ViewableTickets = (); my $SortBy = $Self->{ConfigObject}->Get('Ticket::Frontend::QueueSortBy::Default') || 'Age'; my %SortOptions = ( Owner => 'st.user_id', CustomerID => 'st.customer_id', State => 'st.ticket_state_id', Ticket => 'st.tn', Title => 'st.title', Queue => 'sq.name', Priority => 'st.ticket_priority_id', Age => 'st.create_time_unix', #beginning of mOdification by odlc pour tri correct Age3 => 'triodlc', #end of modification TicketFreeTime1 => 'st.freetime1', TicketFreeTime2 => 'st.freetime2', Second i have change the SQL request corresponding # build query #beginning of mOdification by odlc pour tri correct my $SQL = "SELECT st.id, st.queue_id , IFNULL(sa.timeincome,st.create_time_unix) as triodlc FROM ". " ticket st inner join queue sq on (sq.id = st.queue_id)". " left outer join (select ticket_id, max(incoming_time) as timeincome from article group by ticket_id) sa on (sa.ticket_id = st.id)". #end of modification " WHERE ". " st.ticket_state_id IN ( ${\(join ', ', @{$Self->{ViewableStateIDs}})} ) ". " AND "; if (!$Self->{ViewAll}) { $SQL .= " st.ticket_lock_id IN ( ${\(join ', ', @{$Self->{ViewableLockIDs}})} ) ". " AND "; } $SQL .= " st.queue_id IN ( "; foreach (0..$#ViewableQueueIDs) { if ($_ > 0) { $SQL .= ","; } $SQL .= $Self->{DBObject}->Quote($ViewableQueueIDs[$_]); } $SQL .= " ) AND ". " sq.group_id IN ( ${\(join ', ', @GroupIDs)} ) ". Regards, Olivier de la Clergerie
participants (1)
-
Olivier de la CLERGERIE