To display Workorder grpah at CustomerTicketZoom view

Moderator: crythias

Locked
bagwari
Znuny newbie
Posts: 2
Joined: 01 Jun 2015, 11:10
Znuny Version: 3.3.x
Real Name: Manish
Company: XYZ ltd.

To display Workorder grpah at CustomerTicketZoom view

Post by bagwari »

Hi all,
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], 
					},
				);
			}
			

And In CustomerTicketZoom.dtl to display the graph......

Code: Select all


<!-- dtl:block:WorkOrderGraph -->
				<div>
				<b>Change: #$Data{"ChangeNumber"}  - change for approval</b><br/>
                <div>$Data{"WorkOrderGraph"}</div>
				</div> 
				 		
<!-- dtl:block:WorkOrderGraph -->

And I added the setting in SysConfig -> CustomerTicketZoom

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
bagwari
Znuny newbie
Posts: 2
Joined: 01 Jun 2015, 11:10
Znuny Version: 3.3.x
Real Name: Manish
Company: XYZ ltd.

Re: To display Workorder grpah at CustomerTicketZoom view

Post by bagwari »

In AgentTicketZoom View its showing like below image .........

I want to acheive this at customer ticketzoom view so that customer can track the plan status of his ticket.

please help me...
You do not have the required permissions to view the files attached to this post.
Locked