eco-helpers 1.3.9 → 1.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/lib/eco/api/organization/policy_groups.rb +12 -2
- data/lib/eco/api/usecases/default_cases/create_case.rb +1 -1
- data/lib/eco/api/usecases/default_cases/hris_case.rb +1 -1
- data/lib/eco/api/usecases/default_cases/update_case.rb +10 -2
- data/lib/eco/api/usecases/default_cases/upsert_case.rb +1 -1
- data/lib/eco/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 861fdc294bb8624a1cebd3a880a94ae5c0067adb8b61b7e4467afd6b52e0c87a
|
4
|
+
data.tar.gz: e3db0ea2abda25621738bbe3cb7e50ebae1b68e7daaf16344ae1a74aa200aa9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d815d693a7208363238c96adb14250f6010c55b85158c236b157982754e73438f657e2d7639f4801a2530e1ba9952ec6496a6998b3a758a9728c056956fb4688
|
7
|
+
data.tar.gz: 10e1fdab93ce81884d01d474a82b41274c75bd168b52e1b525f53d127b15f8a9fa15759ac5b1b27de2b90997fe883628fec66dcffd443296f2abdb58d881065f
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [1.3.10] - 2020-05-12
|
5
|
+
|
6
|
+
### Added
|
7
|
+
- `Eco::API::Organization::PolicyGroups#to_name` added support for `Array` input
|
8
|
+
- `config.people.default_usergroup`, when defined, will have effect on usecases: `update` (this case was missing the change)
|
9
|
+
* on account creation, if the input file did not specify `policy_group_ids`
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
### Fixed
|
13
|
+
- `upsert`, `hris` and `create` usecases: fixed condition for use of default_usergroup
|
14
|
+
|
4
15
|
## [1.3.9] - 2020-05-12
|
5
16
|
|
6
17
|
### Added
|
@@ -8,7 +19,7 @@ All notable changes to this project will be documented in this file.
|
|
8
19
|
### Fixed
|
9
20
|
|
10
21
|
- `usecase` callback was not receiving `usecase` paramater
|
11
|
-
* as a consequence `Batch
|
22
|
+
* as a consequence `Batch::Job` created were missing the `usecase`
|
12
23
|
|
13
24
|
## [1.3.8] - 2020-05-07
|
14
25
|
|
@@ -19,7 +19,7 @@ module Eco
|
|
19
19
|
def names
|
20
20
|
@by_name.keys
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def to_id(name)
|
24
24
|
case name
|
25
25
|
when Enumerable
|
@@ -32,10 +32,19 @@ module Eco
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def to_name(id)
|
35
|
-
|
35
|
+
case id
|
36
|
+
when Enumerable
|
37
|
+
id.map do |n|
|
38
|
+
policy_group(n)&.name
|
39
|
+
end.compact
|
40
|
+
else
|
41
|
+
policy_group(id)&.name
|
42
|
+
end
|
43
|
+
|
36
44
|
end
|
37
45
|
|
38
46
|
def policy_group(id_name)
|
47
|
+
pp "the id: #{policy_group_id(id_name)}"
|
39
48
|
@by_id.fetch(policy_group_id(id_name), nil)
|
40
49
|
end
|
41
50
|
|
@@ -64,6 +73,7 @@ module Eco
|
|
64
73
|
end
|
65
74
|
|
66
75
|
def policy_group_id(id_name)
|
76
|
+
pp "by name ('#{id_name}'): #{@by_name[id_name&.downcase]}"
|
67
77
|
(@by_name[id_name&.downcase] || @by_id[id_name])&.id
|
68
78
|
end
|
69
79
|
|
@@ -51,7 +51,7 @@ module Eco
|
|
51
51
|
unless options.dig(:exclude, :policy_groups) && !create
|
52
52
|
end_pg_ids = person.account.policy_group_ids || []
|
53
53
|
|
54
|
-
|
54
|
+
if add_account && def_id && !entry.policy_group_ids?
|
55
55
|
# on account creation, if missing policy_group_ids column in the input
|
56
56
|
# use default_usergroup, if it's defined
|
57
57
|
end_pg_ids = [def_id]
|
@@ -65,7 +65,7 @@ module Eco
|
|
65
65
|
unless options.dig(:exclude, :policy_groups) && !create
|
66
66
|
end_pg_ids = person.account.policy_group_ids || []
|
67
67
|
|
68
|
-
|
68
|
+
if add_account && def_id && !entry.policy_group_ids?
|
69
69
|
# on account creation, if missing policy_group_ids column in the input
|
70
70
|
# use default_usergroup, if it's defined
|
71
71
|
end_pg_ids = [def_id]
|
@@ -46,11 +46,19 @@ module Eco
|
|
46
46
|
|
47
47
|
person.account.send_invites = options[:send_invites] if options.key?(:send_invites)
|
48
48
|
|
49
|
-
unless options.dig(:exclude, :policy_groups)
|
49
|
+
unless options.dig(:exclude, :policy_groups) && !create
|
50
|
+
end_pg_ids = person.account.policy_group_ids || []
|
51
|
+
|
52
|
+
if add_account && def_id && !entry.policy_group_ids?
|
53
|
+
# on account creation, if missing policy_group_ids column in the input
|
54
|
+
# use default_usergroup, if it's defined
|
55
|
+
end_pg_ids = [def_id]
|
56
|
+
end
|
57
|
+
|
50
58
|
# avoid false updates by preserving the original order
|
51
59
|
person.account.policy_group_ids = pgs.user_pg_ids(
|
52
60
|
initial: ini_pg_ids,
|
53
|
-
final:
|
61
|
+
final: end_pg_ids
|
54
62
|
)
|
55
63
|
end
|
56
64
|
|
@@ -58,7 +58,7 @@ module Eco
|
|
58
58
|
unless options.dig(:exclude, :policy_groups) && !create
|
59
59
|
end_pg_ids = person.account.policy_group_ids || []
|
60
60
|
|
61
|
-
|
61
|
+
if add_account && def_id && !entry.policy_group_ids?
|
62
62
|
# on account creation, if missing policy_group_ids column in the input
|
63
63
|
# use default_usergroup, if it's defined
|
64
64
|
end_pg_ids = [def_id]
|
data/lib/eco/version.rb
CHANGED