eco-helpers 2.6.3 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e99bac78bf3ad5a08a730b7ea4abe24c86af103df8c388db7d73538c6e4269f8
4
- data.tar.gz: f3ddd9a1918cd556f5c5c31faf507e39b2ffe6fc58cbd6653343f34290f2c8ab
3
+ metadata.gz: 0ecd2c2f2849623bb76d4eb53883c5d7564cb1bf1a3c6365b4d96d3de8c9c68e
4
+ data.tar.gz: 8e4ef9ddee2ca1d9750b9df3aabda5200d93e4a30216306dbe44d68b175883be
5
5
  SHA512:
6
- metadata.gz: ee7ccfe506d52ae5c253f16de9e9cf708c2d8b21b46b07e2b1a2a2ee17e3122f76b25a366d4512c7b22f80bb109cdf28cbf68fb28ea62e67d765739fbcdd53b8
7
- data.tar.gz: '062338c3cb7837c8cd549a5ce6ccc199f5627ef95718991a7db30d4c325b34651a6aad85d2260158f487e6146a088adcbd0907d8090a1e55178950c7a687aa76'
6
+ metadata.gz: 68001b392d5eba8ee710bc315b88adc5c0111ff9b7b6e862e1037b31c10a4269e9453c0514eabb8768c46bf9e9e0128187d072e9eec5ed017b38920cde9fc3c0
7
+ data.tar.gz: 71904f2040ab00bf8cc4fd31b07fef8a80259de806ca63cff717c559c953ade2d99f76a4b336e9dbfc0c48a07ce94616fe49b9daf285cc488fcd3a8c8373281c
data/CHANGELOG.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.6.4] - 2024-02-xx
4
+ ## [2.6.4] - 2024-03-xx
5
5
 
6
6
  ### Added
7
7
  ### Changed
8
+ - updated core **gem** `ecoportal-api`
9
+ - The `subordinates` core people property has been removed from the back-end
10
+ - This was due to some performance issues with org hierarchy model.
11
+ - As a consequence a temporary patch has been added temporarily in the current gem.
12
+
8
13
  ### Fixed
14
+ - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase`
15
+ - initialize `@total_search_results`
9
16
 
10
17
  ## [2.6.3] - 2024-02-29
11
18
 
data/eco-helpers.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "yard", ">= 0.9.34", "< 1"
31
31
  spec.add_development_dependency "redcarpet", ">= 3.6.0", "< 4"
32
32
 
33
- spec.add_dependency 'ecoportal-api', '>= 0.9.6', '< 0.10'
33
+ spec.add_dependency 'ecoportal-api', '>= 0.9.7', '< 0.10'
34
34
  spec.add_dependency 'ecoportal-api-v2', '>= 1.1.6', '< 1.2'
35
35
  spec.add_dependency 'ecoportal-api-graphql', '>= 0.3.13', '< 0.4'
36
36
  spec.add_dependency 'aws-sdk-s3', '>= 1.142.0', '< 2'
@@ -6,12 +6,16 @@ module Eco
6
6
  attr_accessor :entry
7
7
 
8
8
  def identify(section = :person)
9
- if entry && section == :entry
10
- entry.to_s(:identify)
11
- else
12
- str_id = id ? "id: '#{id}'; " : ""
13
- "'#{name}' (#{str_id}ext_id: '#{external_id}'; email: '#{email}')"
14
- end
9
+ return entry.to_s(:identify) if entry && section == :entry
10
+ str_id = id ? "id: '#{id}'; " : ""
11
+ "'#{name}' (#{str_id}ext_id: '#{external_id}'; email: '#{email}')"
12
+ end
13
+
14
+ attr_writer :subordinates
15
+
16
+ # 2024-03-04 patch for API property deletetion
17
+ def subordinates
18
+ @subordinates ||= 0
15
19
  end
16
20
  end
17
21
  Ecoportal::API::V1::Person.include PersonPatch
@@ -38,17 +38,14 @@ module Eco
38
38
  def descrease_subordinates(person, by = 1)
39
39
  if person.is_a?(Ecoportal::API::V1::Person)
40
40
  person.subordinates -= by
41
- #person.subordinates = 0 if person.subordinates < 0
42
41
  end
43
42
  end
44
43
 
45
44
  def increase_subordinates(person, by = 1)
46
45
  if person.is_a?(Ecoportal::API::V1::Person)
47
- #person.subordinates = 0 if person.subordinates < 0
48
46
  person.subordinates += by
49
47
  end
50
48
  end
51
-
52
49
  end
53
50
  end
54
51
  end
@@ -6,7 +6,6 @@ class Eco::API::UseCases::DefaultCases::ToCsvDetailedCase < Eco::API::UseCases::
6
6
 
7
7
  def to_row(person)
8
8
  data = super(person)
9
- data << person.subordinates
10
9
  data << person_supervisor(person)
11
10
  data += user_abilities(person)
12
11
  data += user_permissions_custom(person) if options.dig(:export, :options, :permissions_custom)
@@ -39,7 +38,6 @@ class Eco::API::UseCases::DefaultCases::ToCsvDetailedCase < Eco::API::UseCases::
39
38
 
40
39
  def spot_header(person = people.first)
41
40
  super(person) do |header|
42
- header << "Subordinates"
43
41
  header << "Supervisor Name"
44
42
  header += abilities_header
45
43
  header += abilities_header("custom") if options.dig(:export, :options, :permissions_custom)
@@ -204,6 +204,7 @@ class Eco::API::UseCases::OozeSamples::RegisterUpdateCase < Eco::API::UseCases::
204
204
  end
205
205
 
206
206
  def init_kpis
207
+ @total_search_oozes = 0
207
208
  @retrieved_oozes = 0
208
209
  @non_retrieved_oozes = 0
209
210
  @dupped_search_oozes = 0
@@ -40,11 +40,6 @@ ASSETS.cli.config do |cnf|
40
40
  end
41
41
  end
42
42
 
43
- #filters.add("-input-supervisors") do |people, session, options|
44
- # options.deep_merge!(input: {filter: {subordinates: true}})
45
- # people.newFrom people.to_a.select {|person| person.subordinates > 0}
46
- #end
47
-
48
43
  filters.add("-input-supervisor-id", "only those with certain supervisor id or external_id") do |input, session, options|
49
44
  id = SCR.get_arg("-input-supervisor-id", with_param: true)
50
45
  options.deep_merge!(input: {filter: {supervisor_id: id}})
@@ -21,10 +21,10 @@ ASSETS.cli.config do |cnf|
21
21
  people.external_id_present(false)
22
22
  end
23
23
 
24
- filters.add("-supervisors", "only those that have subordinates") do |people, session, options|
25
- options.deep_merge!(people: {filter: {subordinates: true}})
26
- people.newFrom people.to_a.select {|person| person.subordinates > 0}
27
- end
24
+ # filters.add("-supervisors", "only those that have subordinates") do |people, session, options|
25
+ # options.deep_merge!(people: {filter: {subordinates: true}})
26
+ # people.newFrom people.to_a.select {|person| person.subordinates > 0}
27
+ # end
28
28
 
29
29
  filters.add("-supervisor-id", "only those with certain supervisor") do |people, session, options|
30
30
  id = SCR.get_arg("-supervisor-id", with_param: true)
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "2.6.3"
2
+ VERSION = "2.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura
@@ -116,7 +116,7 @@ dependencies:
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: 0.9.6
119
+ version: 0.9.7
120
120
  - - "<"
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0.10'
@@ -126,7 +126,7 @@ dependencies:
126
126
  requirements:
127
127
  - - ">="
128
128
  - !ruby/object:Gem::Version
129
- version: 0.9.6
129
+ version: 0.9.7
130
130
  - - "<"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0.10'