eco-helpers 1.3.8 → 1.3.13
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/.yardopts +0 -1
- data/CHANGELOG.md +46 -1
- data/lib/eco/api/common/people/default_parsers/date_parser.rb +1 -1
- data/lib/eco/api/organization/people.rb +1 -1
- data/lib/eco/api/organization/policy_groups.rb +10 -2
- data/lib/eco/api/organization/tag_tree.rb +1 -1
- 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/api/usecases/use_case_io.rb +2 -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: 5b59fa190429f792010af645ab28370ef0132ad17fafca035a363722736ab01e
|
4
|
+
data.tar.gz: c35a11ee4935356f1a93a008b63b520bd0809ef3a3d12d2b71e5329eb9f721f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9d7f407038348bfb98bc8c1cf127d73108f3e90b92d3cd267f8c1868a1fad5810226506e4112f7c87d9deb6775af2d7ad94bb27dfd4c6c2ea2885b28f7b6c76
|
7
|
+
data.tar.gz: 90c6d245f2eb3fbfa1729765cf7629792eadbd33b84c58333aaac6a7e6a81d395fa150c4ff9c240c24403976c25d471d510441b849159aeaf67a593c19258db1
|
data/.yardopts
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,52 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## [1.3.
|
4
|
+
## [1.3.13] - 2020-05-29
|
5
|
+
|
6
|
+
### Added
|
7
|
+
### Changed
|
8
|
+
### Fixed
|
9
|
+
- `Eco::API::Organization::TagTree#tag?` to accept `nil` by returning `false`
|
10
|
+
- `Eco::API::Common::People::DefaultParsers::DateParser` will parse to `Date` class
|
11
|
+
* it was parsing to `Time` class, while the native gem `ecoportal-api` parses as `Date` ([reference](https://gitlab.com/ecoPortal/ecoportal-api/-/blob/master/lib/ecoportal/api/v1/schema_field.rb))
|
12
|
+
## [1.3.11] - 2020-05-19
|
13
|
+
|
14
|
+
### Added
|
15
|
+
### Changed
|
16
|
+
- stop using `email` as `external_id` on `People#person` & `People#find`
|
17
|
+
* this should result in more accurate searches when using `:strict` options
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
|
21
|
+
## [1.3.11] - 2020-05-12
|
22
|
+
|
23
|
+
### Added
|
24
|
+
### Changed
|
25
|
+
- remove popping up comments on `Eco::API::Organization::PolicyGroups#`
|
26
|
+
### Fixed
|
27
|
+
|
28
|
+
|
29
|
+
## [1.3.10] - 2020-05-12
|
30
|
+
|
31
|
+
### Added
|
32
|
+
- `Eco::API::Organization::PolicyGroups#to_name` added support for `Array` input
|
33
|
+
- `config.people.default_usergroup`, when defined, will have effect on usecases: `update` (this case was missing the change)
|
34
|
+
* on account creation, if the input file did not specify `policy_group_ids`
|
35
|
+
|
36
|
+
### Changed
|
37
|
+
### Fixed
|
38
|
+
- `upsert`, `hris` and `create` usecases: fixed condition for use of default_usergroup
|
39
|
+
|
40
|
+
## [1.3.9] - 2020-05-12
|
41
|
+
|
42
|
+
### Added
|
43
|
+
### Changed
|
44
|
+
### Fixed
|
45
|
+
|
46
|
+
- `usecase` callback was not receiving `usecase` paramater
|
47
|
+
* as a consequence `Batch::Job` created were missing the `usecase`
|
48
|
+
|
49
|
+
## [1.3.8] - 2020-05-07
|
5
50
|
|
6
51
|
### Added
|
7
52
|
|
@@ -65,8 +65,8 @@ module Eco
|
|
65
65
|
pers = candidates.first
|
66
66
|
end
|
67
67
|
|
68
|
+
pers = @by_external_id[email&.downcase.strip]&.first if !pers && !email.to_s.strip.empty?
|
68
69
|
end
|
69
|
-
pers = @by_external_id[email&.downcase.strip]&.first if !pers && !email.to_s.strip.empty?
|
70
70
|
|
71
71
|
pers
|
72
72
|
end
|
@@ -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,7 +32,15 @@ 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)
|
@@ -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