From d4c88ff831c4d999f6921f6b7b38dee0299a319d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 25 Jan 2013 11:58:56 +0100 Subject: [PATCH] Use '' as default title if not given. --- lib/import/otrs.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/import/otrs.rb b/lib/import/otrs.rb index 1f3470f68..2f1ce9e4a 100644 --- a/lib/import/otrs.rb +++ b/lib/import/otrs.rb @@ -1,7 +1,7 @@ module Import::OTRS def self.request(part) url = Setting.get('import_otrs_endpoint') + '/' + part + ';Key=' + Setting.get('import_otrs_endpoint_key') - puts 'GET:' + url + puts 'GET: ' + url # response = Net::HTTP.get_response( URI.parse(url), { :use_ssl => true, :verify_mode => OpenSSL::SSL::VERIFY_NONE } ) uri = URI.parse(url) http = Net::HTTP.new(uri.host, uri.port) @@ -17,7 +17,7 @@ module Import::OTRS def self.post(base, data) url = Setting.get('import_otrs_endpoint') + '/' + base data['Key'] = Setting.get('import_otrs_endpoint_key') - puts 'POST:' + url + puts 'POST: ' + url uri = URI.parse(url) http = Net::HTTP.new(uri.host, uri.port) if url =~ /https/i @@ -141,6 +141,7 @@ module Import::OTRS result.each {|record| ticket_new = { + :title => '', :created_by_id => 1, :updated_by_id => 1, }