eco-helpers 3.0.31 → 3.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -2
- data/lib/eco/api/common/loaders/config/workflow/mailer.rb +13 -11
- data/lib/eco/api/common/loaders/use_case/cli_identify.rb +3 -0
- data/lib/eco/api/common/version_patches/exception.rb +10 -2
- data/lib/eco/api/microcases/people/fetch/with_each.rb +9 -2
- data/lib/eco/api/organization/people/multiple_search_results.rb +42 -36
- data/lib/eco/api/organization/people/similarity.rb +226 -224
- data/lib/eco/api/session/batch/job.rb +1 -0
- data/lib/eco/api/usecases/cli/dsl.rb +0 -1
- data/lib/eco/api/usecases/cli/option.rb +1 -1
- data/lib/eco/api/usecases/default_cases/create_case.rb +3 -3
- data/lib/eco/api/usecases/default_cases/delete_sync_case.rb +2 -2
- data/lib/eco/api/usecases/default_cases/delete_trans_case.rb +3 -3
- data/lib/eco/api/usecases/default_cases/hris_case.rb +10 -9
- data/lib/eco/api/usecases/default_cases/to_csv_case.rb +10 -10
- data/lib/eco/api/usecases/default_cases/to_csv_detailed_case.rb +50 -50
- data/lib/eco/api/usecases/default_cases/update_case.rb +3 -3
- data/lib/eco/cli/config/use_cases/active_case.rb +9 -0
- data/lib/eco/cli/config/use_cases/case_config.rb +27 -0
- data/lib/eco/cli/config/use_cases.rb +2 -15
- data/lib/eco/cli_default/input.rb +6 -0
- data/lib/eco/cli_default/usecases.rb +1 -1
- data/lib/eco/language/auxiliar_logger.rb +1 -1
- data/lib/eco/language/delegation/delegating_blank.rb +4 -16
- data/lib/eco/language/delegation/delegating_missing_const.rb +1 -1
- data/lib/eco/language/methods/call_detector.rb +4 -8
- data/lib/eco/language/methods/dsl_able.rb +29 -33
- data/lib/eco/language/methods/instance_method_helpers.rb +38 -0
- data/lib/eco/language/methods.rb +1 -0
- data/lib/eco/language.rb +1 -1
- data/lib/eco/version.rb +1 -1
- metadata +5 -2
@@ -1,287 +1,289 @@
|
|
1
|
-
module
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
module Eco
|
2
|
+
module API
|
3
|
+
module Organization
|
4
|
+
class People
|
5
|
+
# Class to find out duplicates in the People Manager
|
6
|
+
#
|
7
|
+
# @attr_writer attribute [String, Proc, nil] the target attribute to be read.
|
8
|
+
class Similarity < Eco::API::Organization::People
|
9
|
+
include Eco::Data::FuzzyMatch
|
10
|
+
|
11
|
+
# @!group Config
|
12
|
+
# @return [String, Proc, nil] the target attribute to be read.
|
13
|
+
attr_writer :attribute
|
14
|
+
|
15
|
+
def attribute
|
16
|
+
@attribute ||= :name
|
17
|
+
end
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
# Returns the target value to analyse
|
20
|
+
# @param person [Ecoportal::API::V1::Person]
|
21
|
+
def item_value(item)
|
22
|
+
return attribute.call(item) if attribute.is_a?(Proc)
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
attr = attribute.to_sym
|
25
|
+
item.send(attr) if item.respond_to?(attr)
|
26
|
+
end
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# Define the order or relevant of per user matches
|
29
|
+
# @param values[Array<Symbol>] the algorithms' results it should
|
30
|
+
# be ordered by:
|
31
|
+
# * Possible values: `:dice`, `:levenshtein`, `:jaro_winkler`,
|
32
|
+
# `:ngrams`, `:words_ngrams`, `:chars_position`
|
33
|
+
attr_writer :order
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
def order
|
36
|
+
@order ||= %i[words_ngrams dice]
|
37
|
+
end
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
# Define the order or relevant of per user matches
|
40
|
+
# @param value [Float] the threshold that all of the algorithms should comply with
|
41
|
+
attr_writer :threshold
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
def threshold
|
44
|
+
@threshold ||= 0.15
|
45
|
+
end
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
# Generates a new object with same config but different base `data`.
|
48
|
+
# @return [Eco::API::Organization::People::Similarity]
|
49
|
+
def newFrom(data) # rubocop:disable Naming/MethodName
|
50
|
+
super(data).tap do |simil|
|
51
|
+
simil.threshold = threshold
|
52
|
+
simil.order = order
|
53
|
+
simil.attribute = attribute
|
54
|
+
end
|
53
55
|
end
|
54
|
-
end
|
55
56
|
|
56
|
-
|
57
|
+
# @!endgroup
|
57
58
|
|
58
|
-
|
59
|
+
# @!group Searchers
|
59
60
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
# It gathers those that have the same `email`
|
62
|
+
# @return [Hash] where `keys` are `email`s and `values` an `Array<Person>`
|
63
|
+
def repeated_emails
|
64
|
+
init_caches
|
65
|
+
@by_email.select do |_email, people|
|
66
|
+
people.count > 1
|
67
|
+
end
|
66
68
|
end
|
67
|
-
end
|
68
69
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
# It returns all people with no name
|
71
|
+
# @return [Eco::API::Organization::People::Similarity]
|
72
|
+
def unnamed
|
73
|
+
select do |person|
|
74
|
+
person.name.to_s.strip.length < 2
|
75
|
+
end.then do |results|
|
76
|
+
newFrom(results)
|
77
|
+
end
|
76
78
|
end
|
77
|
-
end
|
78
79
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
80
|
+
# It returns all people with no name
|
81
|
+
# @return [Eco::API::Organization::People::Similarity]
|
82
|
+
def named
|
83
|
+
reject do |person|
|
84
|
+
person.name.to_s.strip.length < 2
|
85
|
+
end.then do |results|
|
86
|
+
newFrom(results)
|
87
|
+
end
|
86
88
|
end
|
87
|
-
end
|
88
89
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
90
|
+
# It returns all the entries with `attribute` empty
|
91
|
+
# @return [Eco::API::Organization::People::Similarity]
|
92
|
+
def blank_attribute
|
93
|
+
select do |person|
|
94
|
+
item_value(person).to_s.strip.length < 2
|
95
|
+
end.then do |results|
|
96
|
+
newFrom(results)
|
97
|
+
end
|
96
98
|
end
|
97
|
-
end
|
98
99
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
100
|
+
# It returns all the entries with `attribute` **n0t** empty
|
101
|
+
# @return [Eco::API::Organization::People::Similarity]
|
102
|
+
def attribute_present
|
103
|
+
reject do |person|
|
104
|
+
item_value(person).to_s.strip.length < 2
|
105
|
+
end.then do |results|
|
106
|
+
newFrom(results)
|
107
|
+
end
|
106
108
|
end
|
107
|
-
end
|
108
109
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
110
|
+
# @!endgroup
|
111
|
+
|
112
|
+
# @!group Analisys starters
|
113
|
+
|
114
|
+
# Analyses People bases on `options`
|
115
|
+
# @param needle_read [Proc, Symbol] when the value to
|
116
|
+
# read from `needle` object is different to the `:read` (`attribute`).
|
117
|
+
# This allows to for example, facet `needle.name` (needle_read)
|
118
|
+
# against `haystack_item.details[alt_id]` (read).
|
119
|
+
# @param keep_empty [Boolean] to indicate if it should get
|
120
|
+
# rid of people with no results (based on threshold)
|
121
|
+
# @return [Hash] where the _keys_ are the people `id`s and
|
122
|
+
# the _values_ the `Eco::Data::FuzzyMatch::Results`
|
123
|
+
def analyse(needle_read: nil, keep_empty: false, **options)
|
124
|
+
options = { read: attribute }.merge(options)
|
125
|
+
total = count
|
126
|
+
i = 1
|
127
|
+
|
128
|
+
each_with_object({}) do |person, results|
|
129
|
+
needle_str = needle_read ? item_string(person, needle_read) : nil
|
130
|
+
results[person.id] = find_all_with_score(person, needle_str: needle_str, **options)
|
131
|
+
|
132
|
+
print_progress('Analysed', total, i)
|
133
|
+
i += 1
|
134
|
+
end.then do |analysed|
|
135
|
+
analysed = clean_empty(analysed) unless keep_empty
|
136
|
+
#puts "... #{analysed.count} results after cleaning empty"
|
137
|
+
analysed
|
138
|
+
end
|
137
139
|
end
|
138
|
-
end
|
139
140
|
|
140
|
-
|
141
|
+
# @!endgroup
|
141
142
|
|
142
|
-
|
143
|
+
# @!group Results Treatment
|
143
144
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
145
|
+
# Gets a new instance object of this class, with only people in results
|
146
|
+
# @param analysed [Hash] where the _keys_ are the people `id`s and _values_ the `Eco::Data::FuzzyMatch::Results`
|
147
|
+
# @return [Eco::API::Organization::People::Similarity]
|
148
|
+
def newSimilarity(analysed) # rubocop:disable Naming/MethodName
|
149
|
+
newFrom(people_in_results(analysed))
|
150
|
+
end
|
150
151
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
152
|
+
def people_in_results(analysed)
|
153
|
+
analysed.each_with_object([]) do |(id, results), people|
|
154
|
+
# spot related
|
155
|
+
results.each_with_object([self[id]]) do |result, related|
|
156
|
+
related << result.match
|
157
|
+
end.each do |person|
|
158
|
+
next if people.include?(person)
|
158
159
|
|
159
|
-
|
160
|
+
people << person
|
161
|
+
end
|
160
162
|
end
|
161
163
|
end
|
162
|
-
end
|
163
164
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
165
|
+
# Removes from results those that do not have similar entries
|
166
|
+
def clean_empty(analysed)
|
167
|
+
analysed.reject do |_id, results|
|
168
|
+
results.empty?
|
169
|
+
end
|
168
170
|
end
|
169
|
-
end
|
170
171
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
172
|
+
# Helper to do some treatment fo the results
|
173
|
+
# @param analysed [Hash] where the _keys_ are the people `id`s and _values_ the `Eco::Data::FuzzyMatch::Results`
|
174
|
+
# @return [Hash] where the _keys_ are the people `id`s and _values_ the `Eco::Data::FuzzyMatch::Results`
|
175
|
+
def with_analysed(analysed, keep_empty: false)
|
176
|
+
analysed.each_with_object({}) do |(id, results), reanalysed|
|
177
|
+
reanalysed[id] = yield(self[id], results)
|
178
|
+
end.then do |reanalysed|
|
179
|
+
reanalysed = clean_empty(reanalysed) unless keep_empty
|
180
|
+
reanalysed
|
181
|
+
end.tap do |out|
|
182
|
+
puts "with_analysed... returns #{out.count} records"
|
183
|
+
end
|
182
184
|
end
|
183
|
-
end
|
184
185
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
186
|
+
# Launches a reanalyis on `analysed` based on `options`
|
187
|
+
# @param analysed [Hash] where the _keys_ are the people `id`s and the _values_ the `Eco::Data::FuzzyMatch::Results`
|
188
|
+
def rearrange(analysed, **options)
|
189
|
+
with_analysed(analysed) do |person, results|
|
190
|
+
results.relevant_results(**options)
|
191
|
+
end
|
190
192
|
end
|
191
|
-
end
|
192
193
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
194
|
+
# Reanalyses by using a block to treat the needle and item values
|
195
|
+
def reanalyse(analysed, msg: 'Reanalysing', **options, &block)
|
196
|
+
options = { read: attribute }.merge(options)
|
197
|
+
total = analysed.count
|
198
|
+
i = 1
|
198
199
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
200
|
+
with_analysed(analysed) do |_person, results|
|
201
|
+
print_progress(msg, total, i)
|
202
|
+
i += 1
|
203
|
+
recalculate_results(results, &block)
|
204
|
+
end
|
203
205
|
end
|
204
|
-
end
|
205
206
|
|
206
|
-
|
207
|
-
|
208
|
-
|
207
|
+
# Renalyses by ignoring matching words between the `needle` and those found in `results`
|
208
|
+
def ignore_matching_words(analysed, **options)
|
209
|
+
prompt = 'Reanalysing by ignoring matching words'
|
209
210
|
|
210
|
-
|
211
|
-
|
211
|
+
reanalyse(analysed, msg: prompt, **options) do |needle_str, item_str, _needle, _item|
|
212
|
+
self.class.remove_matching_words(needle_str, item_str)
|
213
|
+
end
|
212
214
|
end
|
213
|
-
end
|
214
215
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
216
|
+
# Renalyses by ignoring matching words between the `needle` and those found in `results`
|
217
|
+
def ignore_matching_words_old(analysed, **options)
|
218
|
+
options = { read: attribute }.merge(options)
|
219
|
+
total = analysed.count
|
220
|
+
i = 1
|
220
221
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
222
|
+
with_analysed(analysed) do |person, results|
|
223
|
+
print_progress('Reanalysing by ignoring matching words', total, i)
|
224
|
+
i += 1
|
225
|
+
ignore_same_words_score(results, **options)
|
226
|
+
end
|
225
227
|
end
|
226
|
-
end
|
227
228
|
|
228
|
-
|
229
|
+
# @!endgroup
|
229
230
|
|
230
|
-
|
231
|
+
# @!group Reporting Helpers
|
231
232
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
233
|
+
# @return [String] well structured text
|
234
|
+
def report(analysed, format: :txt)
|
235
|
+
case format
|
236
|
+
when :txt
|
237
|
+
analysed.each_with_object('') do |(id, results), out|
|
238
|
+
out << "#{self[id].identify}:\n "
|
239
|
+
out << results.results.map(&:print).join("\n ")
|
240
|
+
out << "\n"
|
241
|
+
end
|
240
242
|
end
|
241
243
|
end
|
242
|
-
end
|
243
244
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
245
|
+
# @note
|
246
|
+
# 1. Unless `:analysed` is provided, it launches an analysis cutting with Jaro Winker min 0.5
|
247
|
+
# 2. It then re-sorts and cuts based on `options`
|
248
|
+
# @return [Hash] where the _keys_ are the people `id`s and the _values_ the `Eco::Data::FuzzyMatch::Results`
|
249
|
+
def print_analysis(**options)
|
250
|
+
analysed = options[:analysed]
|
251
|
+
analysed ||= results_with_false_positives.analyse(**options)
|
251
252
|
|
252
|
-
|
253
|
-
|
253
|
+
analysed.each_with_object({}) do |(id, results), out|
|
254
|
+
puts report(analysed)
|
255
|
+
end
|
254
256
|
end
|
255
|
-
|
256
|
-
# @!endgroup
|
257
|
+
# @!endgroup
|
257
258
|
|
258
|
-
|
259
|
+
protected
|
259
260
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
261
|
+
def on_change
|
262
|
+
remove_instance_variable(@fuzzy_match)
|
263
|
+
super
|
264
|
+
end
|
264
265
|
|
265
|
-
|
266
|
+
private
|
266
267
|
|
267
|
-
|
268
|
-
|
269
|
-
|
268
|
+
def print_progress(msg, total, num)
|
269
|
+
return unless total > 10
|
270
|
+
puts '' unless num > 1
|
270
271
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
272
|
+
@print_msg_len ||= 0
|
273
|
+
percent = (100 * num.to_f / total).round(1)
|
274
|
+
msg = " #{msg}: #{percent}% (#{num} of #{total})\r"
|
275
|
+
@print_msg_len = msg.length unless @print_msg_len > msg.length
|
275
276
|
|
276
|
-
|
277
|
-
|
277
|
+
print msg
|
278
|
+
$stdout.flush
|
278
279
|
|
279
|
-
|
280
|
+
return unless percent > 99.9
|
280
281
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
282
|
+
sleep(0.2)
|
283
|
+
print "#{' ' * @print_msg_len}\r"
|
284
|
+
$stdout.flush
|
285
|
+
nil
|
286
|
+
end
|
285
287
|
end
|
286
288
|
end
|
287
289
|
end
|
@@ -506,6 +506,7 @@ module Eco
|
|
506
506
|
dir = config.people.requests_folder
|
507
507
|
filename = name.split(' ').join('-').gsub(/[=\\\/><,"-]+/, '_') # rubocop:disable Style/RedundantArgument
|
508
508
|
file = File.join(dir, "#{type}_data_#{filename}#{dry_run}.json")
|
509
|
+
|
509
510
|
file_manager.save_json(requests, file, :timestamp)
|
510
511
|
end
|
511
512
|
|
@@ -10,7 +10,7 @@ class Eco::API::UseCases::Cli
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def dup(name: self.name, desc: self.desc, &block)
|
13
|
-
self.class.new(name, desc, &(block || callback))
|
13
|
+
self.class.new(name, desc, &(block || callback)) # rubocop:disable Style/RedundantParentheses
|
14
14
|
end
|
15
15
|
|
16
16
|
def link_case(cli_config_case)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class Eco::API::UseCases::DefaultCases::CreateCase < Eco::API::Common::Loaders::UseCase
|
2
|
-
name
|
2
|
+
name 'create'
|
3
3
|
type :sync
|
4
4
|
|
5
5
|
def main(entries, people, session, options, usecase)
|
6
|
-
creation = session.new_job(
|
7
|
-
supers = session.new_job(
|
6
|
+
creation = session.new_job('main', 'create', :create, usecase)
|
7
|
+
supers = session.new_job('post', 'supers', :update, usecase, :core)
|
8
8
|
|
9
9
|
micro.with_each_starter(entries, people, options, log_present: true, append_created: append_created) do |entry, person|
|
10
10
|
creation.add(person)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class Eco::API::UseCases::DefaultCases::DeleteSyncCase < Eco::API::UseCases::DefaultCases::DeleteTransCase
|
2
|
-
name
|
2
|
+
name 'delete'
|
3
3
|
type :sync
|
4
4
|
|
5
|
-
def main(entries,
|
5
|
+
def main(entries, *_args)
|
6
6
|
found = micro.with_each_present(entries, people, options, log_starter: true)
|
7
7
|
delete(found)
|
8
8
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class Eco::API::UseCases::DefaultCases::DeleteTransCase < Eco::API::Common::Loaders::UseCase
|
2
|
-
name
|
2
|
+
name 'delete'
|
3
3
|
type :transform
|
4
4
|
|
5
5
|
def delete(people)
|
6
|
-
delete
|
6
|
+
delete = session.new_job('main', 'delete', :delete, usecase)
|
7
7
|
people.each {|person| delete.add(person)}
|
8
8
|
end
|
9
9
|
|
10
|
-
def main(
|
10
|
+
def main(*_args)
|
11
11
|
delete(people)
|
12
12
|
end
|
13
13
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Eco::API::UseCases::DefaultCases::HrisCase < Eco::API::Common::Loaders::UseCase
|
2
|
-
name
|
2
|
+
name 'hris'
|
3
3
|
type :sync
|
4
4
|
|
5
5
|
attr_reader :creation, :update, :supers, :leavers
|
@@ -7,10 +7,10 @@ class Eco::API::UseCases::DefaultCases::HrisCase < Eco::API::Common::Loaders::Us
|
|
7
7
|
def main(entries, people, session, options, usecase)
|
8
8
|
require_only_one_schema!
|
9
9
|
micro = session.micro
|
10
|
-
@leavers = session.new_job(
|
11
|
-
@creation = session.new_job(
|
12
|
-
@update = session.new_job(
|
13
|
-
@supers = session.new_job(
|
10
|
+
@leavers = session.new_job('pre', 'leavers', :update, usecase, :account)
|
11
|
+
@creation = session.new_job('main', 'create', :create, usecase)
|
12
|
+
@update = session.new_job('main', 'update', :update, usecase)
|
13
|
+
@supers = session.new_job('post', 'supers', :update, usecase, :core)
|
14
14
|
|
15
15
|
micro.with_each_leaver(entries, people, options) do |person|
|
16
16
|
leavers.add(person, &method(:leavers_callback))
|
@@ -18,6 +18,7 @@ class Eco::API::UseCases::DefaultCases::HrisCase < Eco::API::Common::Loaders::Us
|
|
18
18
|
|
19
19
|
micro.with_each(entries, people, options, append_created: append_created) do |entry, person|
|
20
20
|
person.new? ? creation.add(person) : update.add(person)
|
21
|
+
|
21
22
|
micro.set_core_with_supervisor(entry, person, people, supers, options)
|
22
23
|
entry.set_details(person) unless options.dig(:exclude, :details)
|
23
24
|
micro.set_account(entry, person, options)
|
@@ -45,10 +46,10 @@ class Eco::API::UseCases::DefaultCases::HrisCase < Eco::API::Common::Loaders::Us
|
|
45
46
|
|
46
47
|
msg = "There are #{other_people.length} people in schemas other than #{active_schema.name}."
|
47
48
|
msg << " Please, use the filter option '-schema-id SchemaName' for the 'hris' case"
|
48
|
-
msg <<
|
49
|
-
msg <<
|
50
|
-
msg <<
|
51
|
-
msg <<
|
49
|
+
msg << ' to only include those of that schema in the current update.'
|
50
|
+
msg << ' The HRIS case identifies people that are not in the file as leavers'
|
51
|
+
msg << ' (as it will remove the account of all the people of other schemas'
|
52
|
+
msg << ' if they are not in the input file).'
|
52
53
|
msg << "\n For example: -schema-id '#{active_schema.name.downcase}'"
|
53
54
|
log(:error) { msg }
|
54
55
|
raise msg
|