Skip to content

Instantly share code, notes, and snippets.

@thorsteneckel thorsteneckel/HowTo.txt
Last active Aug 29, 2015

Embed
What would you like to do?
Display pending time in date format in AgentTicketZoom (KIX4OTRS)
Usualy the pending time is displayed like this in the AgentTicketZoom view:
Pending till:
23 h
49 m
This gist describes how to change the display format to:
Pending till:
26.06.2014 19:30
( 23 h 47 m )
To do so we have to change two files:
File:
KIX4OTRS/Kernel/Output/HTML/Standard/AgentKIXSidebarTicketInfo.dtl
Search for:
<!-- dtl:block:PendingUntil -->
<label>$Text{"Pending till"}:</label>
<p class="Value $QData{"PendingUntilClass"}">$Data{"PendingUntil"}</p>
<div class="Clear">
&nbsp;
</div>
<!-- dtl:block:PendingUntil -->
Replace with:
<!-- dtl:block:PendingUntil -->
<label>$Text{"Pending till"}:</label>
<p class="Value $QData{"PendingUntilClass"}">
$TimeShort{"$QData{"UntilTimeHuman"}"}
<br/>
( $Data{"PendingUntil"} )
</p>
<div class="Clear">
&nbsp;
</div>
<!-- dtl:block:PendingUntil -->
File:
KIX4OTRS/Kernel/Output/HTML/KIXSidebarTicketInfo.pm
Search for:
# show pending until, if set:
if ( $Ticket{UntilTime} ) {
if ( $Ticket{UntilTime} < -1 ) {
$Ticket{PendingUntilClass} = 'Warning';
}
$Ticket{PendingUntil} .= $Self->{LayoutObject}->CustomerAge(
Age => $Ticket{UntilTime},
Space => '<br/>'
);
$Self->{LayoutObject}->Block(
Name => 'PendingUntil',
Data => \%Ticket,
);
}
Replace with:
# show pending until, if set:
if ( $Ticket{UntilTime} ) {
if ( $Ticket{UntilTime} < -1 ) {
$Ticket{PendingUntilClass} = 'Warning';
}
$Ticket{PendingUntil} .= $Self->{LayoutObject}->CustomerAge(
Age => $Ticket{UntilTime},
Space => ' '
);
$Ticket{UntilTimeHuman} = $Self->{TimeObject}->SystemTime2TimeStamp(
SystemTime => ( $Ticket{UntilTime} + $Self->{TimeObject}->SystemTime() ),
);
$Self->{LayoutObject}->Block(
Name => 'PendingUntil',
Data => \%Ticket,
);
}
et voilà!
(note that mod_perl environments might need an apache restart)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.