CHANGELOG.md in eco-helpers-1.5.1 vs CHANGELOG.md in eco-helpers-1.5.2

- old
+ new

@@ -1,11 +1,91 @@ # Change Log All notable changes to this project will be documented in this file. -## [1.5.1] - 2020-10-xx +## [1.5.2] - 2020-10-29 ### Added + - **custom** usecases, policies and error handlers can now be **declared within its own class** + * helper classes to inherit from: `Eco::API::Custom::UseCase`, `Eco::API::Custom::Policy`, `Eco::API::Custom::ErrorHandler` and `Eco::API::Custom::Parser` + * please, notice that you should create new classes under the following namespaces + - `Custom::UseCase`: custom use cases + - `Custom::Policy`: custom policy + - `Custom::ErrorHandler`: custom error handler + - `Custom::Parser`: custom parser + * this also allows to inherit from existing defaults and models (models to come) + - implemented first **microcases** (evaluation stage): to be able to centralize common code between use cases + - see `Eco::API::MicroCases` class + - **command line** added `--help` to list all `usecases`, `options` and `filters` + * `--help -options` will print a documented overview of options + * `--help -filters` will print a documented overview of people filters + * `--help -input-filters` will print a documented overview of input data filters + * `--help -usecases` will print a documented overview of the usecases + - **command line** filters for `filter_tags` on: + * input data: `-input-filter-tags-all`, `input-filter-tags-any`, `input-filter-tags-tree` + * people data: `-filter-tags-all`, `-filter-tags-any`, `-filter-tags-tree` + - **batch stats** & **batch policy** + * `Eco::API::Session::Batch::RequestStats`: included additional guide on what has been **blanked**. + - now on you should see how many have been blanked, i.e.: `blanked_email`, `blanked_filter_tags`, `blanked_policy_group_ids`, `blanked_supervisor_id` + * Moreover, the new `blanked_*` properties are available for `config.batch_policies` provided that you can limit the `max` and/or `min` expected on each batch **type** + - **csv** generation (`-people-to-csv` and `-people-to-csv -detailed`): + * now includes `"Has Account?"` new column + * removed the useless `send_invites` column + - **errors** improved error message when setting values to a `person` from an `entry`: + * it now shows the **row number** + * it now gives the specific value that failed in case of `Exception` + - `Eco::API::Common::DefaultPasers::LoginProvidersParser`: made native + - `Eco::API::UseCases::DefaultUsecases::TransferAccountCase`: added `-transer-account-from` usecase + * to allow actually transfer an account/user from one person to another in the org + - `Ecoportal::API::V1::Person#entry`: method to be able to have a reference to the update/creation input data entry. + - new filter methods for `Eco::API::Common::People::Entries` and `Eco::API::Organization::People` + * `#filter_tags_any` & `#filter_tags_all`: those that have any or all the target tags + * `#policy_group_ids_any` & `#policy_groups_all`: those that have any or all the target policy groups + +### Changed + - updated dependency on `ecoportal-api` gem + - **command line** some changes: + - renamed `-refresh-presets` to `-refresh-abilities` + - renamed `-recover-db` to `restore-db` + - removed `Eco::API::Session::Tasks`: all the helpers have been moved and documented as part of `Eco::API::MicroCases` (some have been renamed) + - as a consequence, removed method `Eco::API::Session#do` + - `Eco::API::Common::People::PersonEntry#to_hash` has been removed + - now you should use the more explicit `Eco::API::Common::People::PersonEntry#external_entry` + - **internal refactor** of `Eco::API::UseCases::DefaultCases`: + * made so they inherit from `Eco::API::Common::Loaders::UseCase` and cases are autoloaded during run-time + - **internal refactor** of input entries processing: + * `Eco::API::Common::People::PersonEntry` internal refactor + - need to make the code clearer and make the `parsing` and `serializing` symmetrical + - the `serializers` were expecting an `Ecoportal::API::V1::Person`, which was at a different to that of when the `parsers` kicked in. + - now it has been introduced the possibility to launch the serializer in a different stage of the process + - to keep backwards compatibility, now it is possible to define at which `phase` of the parsing/serializing each parser and each serializer should kick in, which entailed changes in other classes and a new parameter in some methods thereof... + * `Eco::Language::Models::ParserSerializer` offers `category` parameter so you can have multiple parsers and serializers per each parser/serializer (one per category). + * `Eco::API::Common::People::PersonParser` uses `category` to define a `phase` when the `parser` or the `serializer` should be active => the expected object in the parser `callback` will be different depending on at which phase it is active and therefore called + - for `parser` valid **phases** are `:internal` (default) and `:final` + - for `serializer` valid **phases** are `:person` (default), `:final` and `:internal` + - the expected output of such **callbacks** is the same as before: either the single `value` to return or a `Hash` with pair key/values of virtually-generated or existing-modified attributes of the source/input data passed to the parser + +### Fixed + - **command line** + * `-search-soft` was being ignored in orgs with org config `session.config.people.strict_search = true` + * Log connection information (**enabled**): it was not printing where the connection was being made + * enabled chaining between usecases: they will be processed in the order they hold in the command line + - Removed error double backtrace (now it should only show one) + - `Eco::API::Common::People::EntryFactory#entries` was not using `encoding` parameter properly. + - `Eco::API::Common::People::DefaultParsers::CSVParser` does at `strip` (trim) of the header names. + - `Eco::API::Organization::PresetsFactory#merge` was including abilities that were not included in the custom presets + - fix: it will include only those that are defined, provided that using it will not override account abilities that should not be targeted, such as `tasks` + - this new behavior will preserve account abilities that should be preserved; not targeted by the custom presets + - some use cases where giving incorrect row number, fixed so they do: + - `Eco::API::Common::People::EntryFactory#entries` adds `idx` key to each `entry` + - `Eco::API::Common::People::PersonEntry`: serialization process has been normalized (previously there were missing fields) + - this fix makes the `csv` with the complete set of fields that should be exported + - `Ecoportal::API::Internal::Person#account_added` fixed typo + - `Ecoportal::API::Session::Batch#get_people` should return `Array<Person>` invariably + +## [1.5.1] - 2020-10-08 + +### 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 @@ -35,10 +115,10 @@ }) 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` + - `Eco::API::Common::People::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