2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-08-14 11:56:23 +00:00
|
|
|
class Sequencer
|
|
|
|
class Unit
|
|
|
|
module Import
|
|
|
|
module Common
|
|
|
|
module User
|
|
|
|
module Attributes
|
|
|
|
class Downcase < Sequencer::Unit::Base
|
2017-12-21 11:19:30 +00:00
|
|
|
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
|
2017-09-01 12:02:12 +00:00
|
|
|
|
2018-04-26 07:07:30 +00:00
|
|
|
skip_action :skipped, :failed
|
2017-08-14 11:56:23 +00:00
|
|
|
|
|
|
|
uses :mapped
|
|
|
|
|
|
|
|
def process
|
2017-11-23 08:09:44 +00:00
|
|
|
%i[login email].each do |attribute|
|
2017-08-14 11:56:23 +00:00
|
|
|
next if mapped[attribute].blank?
|
2018-10-09 06:17:41 +00:00
|
|
|
|
2017-08-14 11:56:23 +00:00
|
|
|
mapped[attribute].downcase!
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|