Print sorting

Moderator: crythias

Post Reply
umbertobernardi
Znuny newbie
Posts: 9
Joined: 16 Jan 2018, 18:14
Znuny Version: OTRS free 5

Print sorting

Post by umbertobernardi »

Hello, is possible to default sorting order when printing ticket?

My boss ask the PDF have to start from the first article and so on 'till the ticket closure.



Thank you!!
p3isys
Znuny newbie
Posts: 9
Joined: 23 Sep 2010, 07:47
Znuny Version: Znuny 6
Real Name: Rob Mitchell
Company: P3iSys LLC
Location: Memphis, Tennessee USA
Contact:

Re: Print sorting

Post by p3isys »

It's been more than four years since this question was posted, but since I came to the forums with the same question, I'll provide the answer I found.

Yes. It is possible. Here's how.

Background:
Sort order of the articles is set by the value of the system configuration property

'Ticket::Frontend::ZoomExpandSort'

The available values for this variable are 'reverse' and 'normal'
The default value is 'reverse' in OTRS6 and Znuny's current version at time of this writing.
The default was 'normal' in OTRS3, which I used for many years previously before switching to Znuny, which forked from OTRS6.

It seems like this value can be edited by an admin through the OTRS/Znuny website as an Admin:

Open OTRS/Znuny
From the Dashboard open the Admin tab, scroll down to Administration and choose System Configuration.
Under Navigation expand Frontend, Agent, View, and click TicketZoom
Scroll down to Ticket::Frontend::ZoomExpandSort
change the value from reverse to normal
Save all edited settings at upper left.

This should change the sort order of articles on the agent front end ticket view to normal.
On my Znuny (OTRS6) system it did not have the desired effect.

I did a bit more digging and found that the property is set in this file:
/opt/otrs/Kernel/Config/Files/ZZZAAuto.pm

Save a copy of the ZZZAAuto.pm file and edit it.
Find the line
$Self->{'Ticket::Frontend::ZoomExpandSort'} = 'reverse';
Edit it to read
$Self->{'Ticket::Frontend::ZoomExpandSort'} = 'normal';
Then save and restart OTRS or reboot.

After this my Znuny system sorted tickets in the agent interface and PDF printouts in normal, not reverse, order.

I hope this will be helpful for someone else. I don't know Perl, and I've only done a little bit of administering Znuny and OTRS to the limited extent of my ability, but I try to be careful when I poke around to avoid breaking anything. I don't know why editing the value in the GUI didn't seem to work, but I was happy to see that editing the file I designated above did the trick.

Kind regards,
Rob Mitchell
Using Znuny 6 on Ubuntu server
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Print sorting

Post by jojo »

The file is Auto generated from values in the System configuration. So should not be changed manually as it will be overwritten
"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
Post Reply