Set ticketObject variable to other independent variable?

Moderator: crythias

Post Reply
crynof
Znuny newbie
Posts: 24
Joined: 20 Mar 2020, 20:23
Znuny Version: 6.0
Real Name: Camilo

Set ticketObject variable to other independent variable?

Post by crynof »

Hi!, I trying to obtain the title of a ticket as a variable to be sent through invoker.

I have tried in various ways but nothing works.

In prepareRequest method:

Code: Select all


my %Ticket = $TicketObject->TicketGet(
        TicketID     => $Param{Data}->{TicketID},
        Type         => $Param{Data}->{Type},
        TicketNumber => $Param{Data}->{TicketNumber},
        Title        => $Param{Data}->{Title},
        Queue        => $Param{Data}->{Queue},        
        State        => $Param{Data}->{State},
        OwnerID      => $Param{Data}->{OwnerID},
        Priority     => $Param{Data}->{Priority},
    );
	
	#I tried with:
	

	my $message= $Param{Data}->{Title};
        my $message= $Ticket{Title};
        
        #but not works.


	return {
			Success => 1,
			Data => {
						%Ticket,
					}
			};

I need to return the title separately from the TicketObject object.

I need to set it to another variable to generate a message.

Could someone guide me?

Many thanks
Cheers
Post Reply