Use '' as default title if not given.
This commit is contained in:
parent
659329f0c8
commit
d4c88ff831
1 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
module Import::OTRS
|
module Import::OTRS
|
||||||
def self.request(part)
|
def self.request(part)
|
||||||
url = Setting.get('import_otrs_endpoint') + '/' + part + ';Key=' + Setting.get('import_otrs_endpoint_key')
|
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 } )
|
# response = Net::HTTP.get_response( URI.parse(url), { :use_ssl => true, :verify_mode => OpenSSL::SSL::VERIFY_NONE } )
|
||||||
uri = URI.parse(url)
|
uri = URI.parse(url)
|
||||||
http = Net::HTTP.new(uri.host, uri.port)
|
http = Net::HTTP.new(uri.host, uri.port)
|
||||||
|
@ -17,7 +17,7 @@ module Import::OTRS
|
||||||
def self.post(base, data)
|
def self.post(base, data)
|
||||||
url = Setting.get('import_otrs_endpoint') + '/' + base
|
url = Setting.get('import_otrs_endpoint') + '/' + base
|
||||||
data['Key'] = Setting.get('import_otrs_endpoint_key')
|
data['Key'] = Setting.get('import_otrs_endpoint_key')
|
||||||
puts 'POST:' + url
|
puts 'POST: ' + url
|
||||||
uri = URI.parse(url)
|
uri = URI.parse(url)
|
||||||
http = Net::HTTP.new(uri.host, uri.port)
|
http = Net::HTTP.new(uri.host, uri.port)
|
||||||
if url =~ /https/i
|
if url =~ /https/i
|
||||||
|
@ -141,6 +141,7 @@ module Import::OTRS
|
||||||
|
|
||||||
result.each {|record|
|
result.each {|record|
|
||||||
ticket_new = {
|
ticket_new = {
|
||||||
|
:title => '',
|
||||||
:created_by_id => 1,
|
:created_by_id => 1,
|
||||||
:updated_by_id => 1,
|
:updated_by_id => 1,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue