Otrs TestSimple.pm (Invoker)
Moderator: crythias
Otrs TestSimple.pm (Invoker)
Hello everyone i would like to add in otrs invoker request (TestSimple.pm) more parameters than TicketID.
For example TicketNumber and Title and many Others.
TestSimple works fine but for only TickedID so anyone knows how help me?
For example TicketNumber and Title and many Others.
TestSimple works fine but for only TickedID so anyone knows how help me?
Re: Otrs TestSimple.pm (Invoker)
changed this
with
and i got on my webservice this 2 parameters.
but how can return a TicketID value instead 'TicketID' and Title value instead 'Title' ???????
already tried with
or
but without success!!!!!
Code: Select all
return {
Success => 1,
Data => $Param{Data},
};
Code: Select all
return {
Success => 1,
Data => {
TicketID => 'TicketID',
Title => 'Title',
},
};
but how can return a TicketID value instead 'TicketID' and Title value instead 'Title' ???????
already tried with
Code: Select all
TicketID => TicketID,
Code: Select all
TicketID => $Param{Data} => TicketID,
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Otrs TestSimple.pm (Invoker)
I think that's a file for testing. If you want to configure your own module, see the manual, there are examples that should give you a good idea about how to write it:
http://otrs.github.io/doc/manual/admin/ ... rface.html
http://otrs.github.io/doc/manual/admin/ ... rface.html
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Otrs TestSimple.pm (Invoker)
sorry where???RStraub wrote:I think that's a file for testing. If you want to configure your own module, see the manual, there are examples that should give you a good idea about how to write it:
http://otrs.github.io/doc/manual/admin/ ... rface.html
i didnt find it
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Otrs TestSimple.pm (Invoker)
Close to the bottom, headlined as "Perl SOAP Requester".
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Otrs TestSimple.pm (Invoker)
Unfortunately i dont know perl, how can update TestSimple.pm for it???'
-
- Znuny expert
- Posts: 213
- Joined: 04 Nov 2012, 23:58
- Znuny Version: OTRS 4.x
- Real Name: Esteban
- Company: NORTON DE COLOMBIA
Re: Otrs TestSimple.pm (Invoker)
To achieve that, you would need an instance of http://otrs.github.io/doc/api/otrs/3.3/ ... et.pm.html
then invoke TicketGet
Something like
then invoke TicketGet
Something like
Code: Select all
...
my %Ticket = $TicketObject->TicketGet( TicketID => $Param{Data}->{TicketID} );
return {
Success => 1,
Data => {
%Ticket
}
};
Re: Otrs TestSimple.pm (Invoker)
Eandrex doesn't works please help cause i dont know perl
My TestSimple.pm changed by your advice
there is some errors im sure
My TestSimple.pm changed by your advice
Code: Select all
package Kernel::GenericInterface::Invoker::Test::TestSimple;
use strict;
use warnings;
use Kernel::System::Ticket;
use Kernel::System::VariableCheck qw(IsString IsStringWithData);
our $ObjectManagerDisabled = 1;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
# check needed params
if ( !$Param{DebuggerObject} ) {
return {
Success => 0,
ErrorMessage => "Got no DebuggerObject!"
};
}
#$Self->{DebuggerObject} = $Param{DebuggerObject};
$Self->{TicketObject} = Kernel::System::Ticket->new( %Param );
return $Self;
}
sub PrepareRequest {
my ( $Self, %Param ) = @_;
my %Ticket = $TicketObject->TicketGet( TicketID => $Param{Data}->{TicketID} );
return {
Success => 1,
Data => {
%Ticket
}
};
}
sub HandleResponse {
my ( $Self, %Param ) = @_;
# if there was an error in the response, forward it
if ( !$Param{ResponseSuccess} ) {
return {
Success => 0,
ErrorMessage => $Param{ResponseErrorMessage},
};
}
return {
Success => 1,
Data => $Param{Data},
};
}
1;
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Otrs TestSimple.pm (Invoker)
So you have no experience in perl, won't tell us what you need or what the error is and expect this forum to write the module for you :/ ?
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Otrs TestSimple.pm (Invoker)
ok sorry but i wrote a new TestSimple.pm module with Eandrex's suggests.
Unfortunately otrs return a generic error "can't load module"
Dont want that forum write it for me, indeed i post my module with error
Unfortunately otrs return a generic error "can't load module"
Dont want that forum write it for me, indeed i post my module with error
Re: Otrs TestSimple.pm (Invoker)
Hire an expert
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: Otrs TestSimple.pm (Invoker)
ahah very very nice behaviour...thanksjojo wrote:Hire an expert
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Otrs TestSimple.pm (Invoker)
I'm with jojo. This forum is volunteer. The code is in perl. Perl isn't that difficult to learn and this forum isn't a perl instruction forum.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Otrs TestSimple.pm (Invoker)
I asked an help if you want give me ok else dont reply no-Friendly message Just for +1
Jojo could avoid that Kind of messag.
Jojo is free to answer or not ŕight but i dont accettare bis answer.
Crithia are you moderator??? It seems not
Jojo could avoid that Kind of messag.
Jojo is free to answer or not ŕight but i dont accettare bis answer.
Crithia are you moderator??? It seems not