As we wanted to display the "unchanged duration" of a Ticket (i.e. how long a ticket has remained untouched) instead of Age in the Dashboard, I tried this package but finally I found something easier.
I only modified Kernel\System\Ticket.pm in sub TicketGet:
Code: Select all
# fillup runtime values
$Ticket{Age} = $Self->{TimeObject}->SystemTime() - $Ticket{CreateTimeUnix};
# Add UnchangedDuration (new)
$Ticket{UnchangedDuration} = $Self->{TimeObject}->SystemTime()
- $Self->{TimeObject}->TimeStamp2SystemTime(
String => $Ticket{Changed},
);
As we also wanted to sort by UnchangedDuration, I added it in sub TicketSearch too (still in Ticket.pm):
Code: Select all
# Modified default sort by 'Age' into 'UnchangedDuration'
# my $SortBy = $Param{SortBy} || 'Age';
my $SortBy = $Param{SortBy} || 'UnchangedDuration';
(...)
my %SortOptions = (
(...)
Age => 'st.create_time_unix',
# Add UnchangedDuration
UnchangedDuration => 'st.change_time',
I think this column is updated whenever a new mail article is appended to the ticket. It is not updated when a new note is added.
What's your opinion about this?
Regards,
HervE