对的,这是可能的。但是您必须进行查找以将 UserID 转换为“可读”名称。
首先,将 Kernel/Modules/CustomerTicketZoom.pm 复制到 Custom/Kernel/Modules/CustomerTicketZoom.pm 然后像这样修改 _mask 方法(在 L#:1000 附近):
# ticket owner
if ( $Self->{Config}->{AttributesView}->{Owner} ) {
my $OwnerName = $Self->{AgentUserObject}->UserName(
UserID => $Param{OwnerID},
);
$Self->{LayoutObject}->Block(
Name => 'Owner',
Data => { OwnerName => $OwnerName },
);
}
####### this is the new part #######
# ticket creator
if ( $Param{CreateBy} != 1 ) {
#1 is the default account if a ticket is created by a customer
my $CreatorName = $Self->{AgentUserObject}->UserName(
UserID => $Param{CreateBy},
);
$Self->{LayoutObject}->Block(
Name => 'Creator',
Data => { CreatorName => $CreatorName },
);
}
####### this is the end of the new part #######
# ticket responsible
if (
$Self->{ConfigObject}->Get('Ticket::Responsible')
&&
$Self->{Config}->{AttributesView}->{Responsible}
)
{
my $ResponsibleName = $Self->{AgentUserObject}->UserName(
UserID => $Param{ResponsibleID},
);
$Self->{LayoutObject}->Block(
Name => 'Responsible',
Data => { ResponsibleName => $ResponsibleName },
);
}
# check if ticket is normal or process ticket
我使用的是 OTRS 3.3.8+ITSM,因此您的行号可能会有所不同。新插入的块检查创建者是否为 != UserID 1,如果创建者不是代理,则 OTRS 用于创建票证的本地管理员帐户。如果它的 != 1 OTRS 执行查找并将真实姓名保存在 var 中。在此之后,创建者 dtl:block 被渲染。
第二部分:修改您的模板文件:将原始文件从 Kernel/Output/HTML/Standard/CustomerTicketZoom.dtl 复制到:Custom/Kernel/OUTPUT/HTML/Standard/CustomerTicketZoom.dtl
并插入一个新块(大约 L#:190 - 在所有者块之后):
<!-- dtl:block:Creator -->
<li><span class="Key">$Text{"Creator"}:</span> $QData{"CreatorName"}</li>
<!-- dtl:block:Creator -->
应用更改后,应正确显示创建者。