Fixed missing downcase for login of agents and customers.
This commit is contained in:
parent
87e1a92e39
commit
70f5f21558
1 changed files with 56 additions and 56 deletions
|
@ -6,13 +6,13 @@ module Import::OTRS
|
|||
|
||||
=begin
|
||||
|
||||
result = request_json( :Subaction => 'List', 1)
|
||||
result = request_json(Subaction: 'List', 1)
|
||||
|
||||
return
|
||||
|
||||
{ some json structure }
|
||||
|
||||
result = request_json( :Subaction => 'List' )
|
||||
result = request_json(Subaction: 'List')
|
||||
|
||||
return
|
||||
|
||||
|
@ -257,13 +257,13 @@ module Import::OTRS
|
|||
return
|
||||
|
||||
{
|
||||
:Ticket => {
|
||||
:total => 1234,
|
||||
:done => 13,
|
||||
Ticket: {
|
||||
total: 1234,
|
||||
done: 13,
|
||||
},
|
||||
:Base => {
|
||||
:total => 1234,
|
||||
:done => 13,
|
||||
Base: {
|
||||
total: 1234,
|
||||
done: 13,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ module Import::OTRS
|
|||
|
||||
# find owner
|
||||
if ticket_new[:owner]
|
||||
user = User.lookup(login: ticket_new[:owner])
|
||||
user = User.find_by(login: ticket_new[:owner].downcase)
|
||||
ticket_new[:owner_id] = if user
|
||||
user.id
|
||||
else
|
||||
|
@ -623,7 +623,7 @@ module Import::OTRS
|
|||
|
||||
# find customer
|
||||
if ticket_new[:customer]
|
||||
user = User.lookup(login: ticket_new[:customer])
|
||||
user = User.lookup(login: ticket_new[:customer].downcase)
|
||||
ticket_new[:customer_id] = if user
|
||||
user.id
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue