I need to show the workorder graph(plan) at customer ticket zoom view according to my client requirement.
At AgentTicketZoom view I already done this but facing problem at customer side.
Could anybody help me on this ?
What I Written code is.........
CustomerTicketZoom.pm
Code: Select all
my $ticketId = $Self->{TicketID};
#get the change IDs related to tickets.
$Self->{DBObject}->Prepare(
SQL => "select lr.target_key, ci.change_number from link_relation lr inner join change_item ci on ci.id = lr.target_key where lr.source_key = ? and lr.source_object_id = '2' and lr.target_object_id= '3' order by ci.change_time DESC",
Bind => [ \$ticketId ],
);
# fetch the result
my @ChangeArry;
my $i=0;
my @IDs;
my @ChangeNumber;
while ( my @Row = $Self->{DBObject}->FetchrowArray() ) {
push @IDs, $Row[0];
push @ChangeNumber, $Row[1];
}
my $size = @IDs;
my @Change;
my @WorkOrderGraph;
for(my $i=0; $i < $size ;$i= $i+1)
{
# get Change
$Change[$i] = $Self->{ChangeObject}->ChangeGet(
#ChangeID => $IDs[$i],
UserID => $Self->{UserID},
);
}
for(my $i=0; $i < $size ;$i= $i+1)
{
# build workorder graph in layout object
$WorkOrderGraph[$i] = $Self->{LayoutObject}->ITSMChangeBuildWorkOrderGraph(
Change => $Change[$i],
WorkOrderObject => $Self->{WorkOrderObject},
);
}
for(my $i=0; $i < $size ;$i= $i+1)
{
# display graph within an own block
$Self->{LayoutObject}->Block(
Name => 'WorkOrderGraph',
Data => {
ChangeNumber => $ChangeNumber[$i],
WorkOrderGraph => $WorkOrderGraph[$i],
},
);
}
Code: Select all
<!-- dtl:block:WorkOrderGraph -->
<div>
<b>Change: #$Data{"ChangeNumber"} - change for approval</b><br/>
<div>$Data{"WorkOrderGraph"}</div>
</div>
<!-- dtl:block:WorkOrderGraph -->
ITSM.ChangeManagement.WorkorderGraph.css
ITSM.ChangeManagement.Default.css
ITSM.ChangeManagement.RTEContent.css
ITSM.Agent.ChangeManagement.WorkorderGraph.js
At agent Side working perfectly but at customer side as I think we need to write new ITSM configuration, if this, how I can achieve this?
Or is there any other way, Please help.
Thanks
manish