# Change Log All notable changes to this project will be documented in this file. ## [1.5.1] - 2020-10-xx ### Added - `presets_values.json`: added the new ability `tasks` (eP release `1.5.3`) - `Ecoportal::API::Internal::Person` patch helper methods: * `new?`: to know if this person is new in the people manager as a result of the current launch * `account_added?`: to know if this person did not have account but they will have it after the current launch - `Eco::API::Session#new_job`: to shorten code - `Eco::API::Common::DefaultPasers::PolicyGroupsParser`: made native, as it is a very common parser - `Eco::API::Common::DefaultPasers::FreemiumParser` to parse/serialise boolean - `Eco::API::Common::People::PersonParser`: added `freemium` as core attribute - `Eco::API::UserCases::DefaultCases::RecoverDBCase`: recovers also `freemium` - scoping **microcases** : to be able to centralize common code between use cases - at its early stage (currently not available for usage) - dependency on `ecoportal-api-oozes` gem - added basic support for **api** `v2` - you can use `session.api(:oozes)` to obtain an api `v2` - you can manage your keys directly on the apis configuration - added `external_key:`, `user_key:` and `apis.default_user_key` ```ruby ASSETS.config do |config| config.apis.default_user_key = 'your-user-key-here' config.add_api("org-environment", { host: 'pre.dev.ecoportal.com', key: 'an-internal-org-api-key', version: :internal, external_key: 'an-external-org-api-key', user_key: 'org-user-key-for-activity-stream', mode: :local }) end ``` ### Changed - internally: load `Eco::API::Common::Session` before `Eco::API::Common::People` - `Eco::API::Common::Person::EntryFactory`: made child of `Eco::API::Common::Session::BaseSession` - refactored all the `api` connection creation for simplicity and to support multi api version - delegated `Eco::API::Session::Batch#get` to `Ecoportal::API::V1::People#get_all` ### Fixed - correct `.gemspec` dependency version restrictions ## [1.5.0] - 2020-09-11 ### Added - `Eco::Data::Files#file_empty?` to prevent error when checking encoding ### Changed - change abilities to align with ecoPortal release `1.5.2` ### Fixed - `Eco::CSV#parse` and `Eco::CSV#read` should use the proper `encoding` when it's `bom` * apparently, this can only be achieved by passing an argument such as `rb:bom|utf-8` * best reference found: https://stackoverflow.com/a/60794851/4352306 ## [1.4.2] - 2020-07-23 ### Added ### Changed ### Fixed - preserve backtrace on logging ## [1.4.0] - 2020-07-14 ### Added ### Changed - change abilities to align with ecoPortal release `1.5.0` - remove some patches on `ecoportal-api` - removed patch method `Ecoportal::API::V1::Person#sync` ### Fixed - `Eco::CSV#parse` and `Eco::CSV#read` should use the proper `:encoding` when it's `bom` ## [1.3.19] - 2020-07-23 ### Added ### Changed ### Fixed - preserve backtrace on logging ## [1.3.18] - 2020-07-08 ### Added ### Changed ### Fixed - the `update` case was missing the code to use the `default_usergroup` ## [1.3.17] - 2020-07-06 ### Added ### Changed - the `hris` case should not only include as `leavers` those that have account, but anyone that leaves * as we could have active people with no account ### Fixed - `Eco::API::Session::Batch::Errors#errors`: fix error for empty `body` on response ## [1.3.16] - 2020-06-26 ### Added - `Eco::API::Common::People::Entries`, `#entry` & `#find` should allow for `strict` search (added parameter) ### Changed - upgraded `ecoportal-api` gem dependency to minimum version `0.5.7` - this includes the removal of some patches - some gems update ### Fixed - patched preferences (`kiosk` preferences should default to `nil`) ## [1.3.15] - 2020-06-11 ### Added - default usecase to export to `csv` (`-detailed`) now includes `"Supervisor Name"` column ### Changed ### Fixed ## [1.3.14] - 2020-06-10 ### Added - `Eco::API::Common::People::SupervisorHelpers` now has its methods as class methods ### Changed - upgraded `ecoportal-api` gem dependency to minimum version `0.5.6` ### Fixed ## [1.3.13] - 2020-05-29 ### Added ### Changed ### Fixed - `Eco::API::Organization::TagTree#tag?` to accept `nil` by returning `false` - `Eco::API::Common::People::DefaultParsers::DateParser` will parse to `Date` class * 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)) ## [1.3.12] - 2020-05-19 ### Added ### Changed - stop using `email` as `external_id` on `People#person` & `People#find` * this should result in more accurate searches when using `:strict` options ### Fixed ## [1.3.11] - 2020-05-12 ### Added ### Changed - remove popping up comments on `Eco::API::Organization::PolicyGroups#` ### Fixed ## [1.3.10] - 2020-05-12 ### Added - `Eco::API::Organization::PolicyGroups#to_name` added support for `Array` input - `config.people.default_usergroup`, when defined, will have effect on usecases: `update` (this case was missing the change) * on account creation, if the input file did not specify `policy_group_ids` ### Changed ### Fixed - `upsert`, `hris` and `create` usecases: fixed condition for use of default_usergroup ## [1.3.9] - 2020-05-12 ### Added ### Changed ### Fixed - `usecase` callback was not receiving `usecase` paramater * as a consequence `Batch::Job` created were missing the `usecase` ## [1.3.8] - 2020-05-07 ### Added - this change log file - `config.people.default_usergroup`, when defined, will have effect on usecases: `create`, `upsert` and `hris` * on account creation, if the input file did not specify `policy_group_ids` ### Changed - `policy` callback to receive new parameter with the `Batch::Job` that it is currently processing/checking **Example of usage** ```ruby ASSETS.config.policies do |policies| policies.define("update-status") do |people, session, options, policy, job| if job.type == :create people.each do |person| person.details["status"] = "Active" if person.details end end if job.name == "leavers" person.details["status"] = "Inactive" if person.details end end end ``` ### Fixed - `reinvite` `:sync` native usecase (`-reinvite-from`): should skip people with no account.