create Ticket by Script

Hilfe zu Znuny Problemen aller Art
Locked
colttt
Znuny newbie
Posts: 21
Joined: 27 Jan 2015, 12:29
Znuny Version: 4.0.5

create Ticket by Script

Post by colttt »

Hallo in die Runde,

ich bin hier grade etwas verzweifelt und weiss leider nicht weiter.
ich habe mir dir rpc-example.pl genommen und etwas angepasst (Server/IP, Username). Wenn ich das script ausführe kommen leider ein paar fehlermeldungen die ich nicht weg bekomme, es scheint auch als wenn er die TicketNummer vergisst..

Code: Select all

NOTICE: TicketObject->TicketCreateNumber()
NOTICE: New Ticket Number is: 20006648
NOTICE: TicketObject->TicketGet(TicketID => 1)
Odd number of elements in hash assignment at ./create_OTRS-Ticket_test-skr.pl line 28.
Use of uninitialized value $Ticket{"TicketNumber"} in concatenation (.) or string at ./create_OTRS-Ticket_test-skr.pl line 29.
NOTICE: Ticket Number is: 
Use of uninitialized value $Ticket{"State"} in concatenation (.) or string at ./create_OTRS-Ticket_test-skr.pl line 30.
NOTICE: Ticket State is:  
Use of uninitialized value $Ticket{"Queue"} in concatenation (.) or string at ./create_OTRS-Ticket_test-skr.pl line 31.
NOTICE: Ticket Queue is:  
NOTICE: TicketObject->TicketCreate(%TicketData)
Use of uninitialized value $TicketID in concatenation (.) or string at ./create_OTRS-Ticket_test-skr.pl line 51.
NOTICE: TicketID is 
Use of uninitialized value $TicketID in concatenation (.) or string at ./create_OTRS-Ticket_test-skr.pl line 54.
NOTICE: TicketObject->TicketDelete(TicketID => )
Use of uninitialized value $TicketID in concatenation (.) or string at ./create_OTRS-Ticket_test-skr.pl line 63.
NOTICE: Delete Ticket with ID  was not successful
NOTICE: CustomerUserObject->CustomerName(UserLogin => 'colttt')
NOTICE: The customer with the login 'colttt' exists
Schonmal danke fuer die Hilfe.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: create Ticket by Script

Post by jojo »

Ich schlage vor gleich die aktuelle Webservice Schnittstelle statt der alten rpc.pl zu nutzen:
http://blog.otrs.org/2012/10/03/easy-ti ... interface/
"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
colttt
Znuny newbie
Posts: 21
Joined: 27 Jan 2015, 12:29
Znuny Version: 4.0.5

Re: create Ticket by Script

Post by colttt »

Top danke, das werde ich mir mal angucken..
colttt
Znuny newbie
Posts: 21
Joined: 27 Jan 2015, 12:29
Znuny Version: 4.0.5

Re: create Ticket by Script

Post by colttt »

Hallo,

leider klappt das nicht ganz..

immer wenn ich die yaml-Datei im webserverice importieren moechte kommt folgender Fehler:

Code: Select all

Backend ERROR: OTRS-CGI-20 Perl: 5.14.2 OS: linux Time: Fri Apr 24 13:36:17 2015 Message: YAML data was not readable even by pure-perl YAML module RemoteAddress: 172.16.22.40 RequestURI: /otrs/index.pl Traceback (12101): Module: Kernel::System::YAML::Load Line: 127 Module: Kernel::Modules::AdminGenericInterfaceWebservice::Run Line: 492 Module: Kernel::System::Web::InterfaceAgent::Run Line: 986 Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 41 Module: (eval) (v1.99) Line: 204 Module: ModPerl::RegistryCooker::run (v1.99) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31
die Datei die ich dafuer nehme ist diese hier: https://raw.githubusercontent.com/OTRS/ ... orSOAP.yml
Locked