Replaced old Import::OTRS with new Import::OTRS2.
This commit is contained in:
parent
60cd77b653
commit
12c0ae1150
7 changed files with 921 additions and 1751 deletions
|
@ -73,7 +73,7 @@ class ImportOtrsController < ApplicationController
|
|||
return if setup_done_response
|
||||
|
||||
Setting.set('import_mode', true)
|
||||
welcome = Import::OTRS2.connection_test
|
||||
welcome = Import::OTRS.connection_test
|
||||
if !welcome
|
||||
render json: {
|
||||
message: 'Migrator can\'t read OTRS output!',
|
||||
|
@ -83,7 +83,7 @@ class ImportOtrsController < ApplicationController
|
|||
end
|
||||
|
||||
# start migration
|
||||
Import::OTRS2.delay.start
|
||||
Import::OTRS.delay.start
|
||||
|
||||
render json: {
|
||||
result: 'ok',
|
||||
|
@ -93,7 +93,7 @@ class ImportOtrsController < ApplicationController
|
|||
def import_status
|
||||
return if setup_done_response
|
||||
|
||||
state = Import::OTRS2.current_state
|
||||
state = Import::OTRS.current_state
|
||||
|
||||
render json: {
|
||||
data: state,
|
||||
|
|
|
@ -19,7 +19,7 @@ class SchedulerCreate < ActiveRecord::Migration
|
|||
add_index :schedulers, [:name], unique: true
|
||||
Scheduler.create_or_update(
|
||||
name: 'Import OTRS diff load',
|
||||
method: 'Import::OTRS2.diff_worker',
|
||||
method: 'Import::OTRS.diff_worker',
|
||||
period: 60 * 3,
|
||||
prio: 1,
|
||||
active: true,
|
||||
|
|
|
@ -11,7 +11,7 @@ module Auth::Otrs
|
|||
return false if endpoint == 'http://otrs_host/otrs'
|
||||
|
||||
# connect to OTRS
|
||||
result = Import::OTRS2.auth( username, password )
|
||||
result = Import::OTRS.auth( username, password )
|
||||
return false if !result
|
||||
return false if !result['groups_ro']
|
||||
return false if !result['groups_rw']
|
||||
|
|
1357
lib/import/otrs.rb
1357
lib/import/otrs.rb
File diff suppressed because it is too large
Load diff
1301
lib/import/otrs2.rb
1301
lib/import/otrs2.rb
File diff suppressed because it is too large
Load diff
|
@ -10,7 +10,7 @@ module Sso::Otrs
|
|||
return false if !params['SessionID']
|
||||
|
||||
# connect to OTRS
|
||||
result = Import::OTRS2.session( params['SessionID'] )
|
||||
result = Import::OTRS.session( params['SessionID'] )
|
||||
|
||||
return false if !result
|
||||
return false if !result['groups_ro']
|
||||
|
|
|
@ -13,7 +13,7 @@ class OtrsImportTest < ActiveSupport::TestCase
|
|||
Setting.set('import_otrs_endpoint', ENV['IMPORT_OTRS_ENDPOINT'])
|
||||
Setting.set('import_otrs_endpoint_key', ENV['IMPORT_OTRS_ENDPOINT_KEY'])
|
||||
Setting.set('import_mode', true)
|
||||
Import::OTRS2.start
|
||||
Import::OTRS.start
|
||||
|
||||
# check settings items
|
||||
test 'check settings' do
|
||||
|
|
Loading…
Reference in a new issue