# Change Log All notable changes to this project will be documented in this file. ## [2.1.10] - 2022-11-xx ### Added ### Changed ### Fixed ## [2.1.9] - 2022-11-29 ### Changed - upgrade `ecoportal-api-v2` **gem** dependency - upgrade `ecoportal-api-graphql` **gem** dependency ### Fixed - `Eco::API::Session::Batch::Job` - Ability to skip prefilter of entries with no `id` on `:update` - Enhanced error tracking (bug resilience) ## [2.1.8] - 2022-11-18 ### Added - `Eco::API::UseCases::OozeSamples::RegisterMigrationCase` - When in `dry-run` mode, it adds one line before creation feedback, so it is clear the feedback is about creation (i.e. none of the source entries got mistakenly updated) - **enhanced** `Eco::API::UseCases::OozeSamples::OozeBaseCase#with_fields` - It allows to optionally pass as first parameter a section or a stage (default: ooze) ### Changed - upgraded gem dependency `ecoportal-api-v2` ## [2.1.7] - 2022-11-17 ### Added - `Eco::API::UseCases::OozeSamples::RegisterMigrationCase` method `excluded_field_hooks` - This enables the ability to prevent fields from being paired/copied/written on ### Changed - **refactored** `#with_src_dst_field_pair` helper - from `Eco::API::UseCases::OozeSamples::HelpersMigration::Copying` ## [2.1.6] - 2022-11-17 ### Fixed - `Eco::API::UseCases::OozeSamples::Helpers::Shortcuts#to_i` (missing param on method) - `Eco::API::UseCases::OozeSamples::HelpersMigration::TypedFieldsPairing#multi_delete` typo ## [2.1.5] - 2022-11-17 ### Added - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` added creation count - Requires use of `#create_ooze(draft, template_id)` - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` added method - `with_rescue` that prompts user to continue - this is for usage in child classes - new use case and helpers thereof `Eco::API::UseCases::OozeSamples::RegisterMigrationCase` ### Changed - upgraded `ecoportal-api-v2` **gem** - **refactored** `Eco::API::UseCases::OozeSamples::Helpers::Shortcuts#same_string?` ## [2.1.4] - 2022-10-20 ### Added - `Eco::API::Common::Session::Mailer#mail` added parameters `cc` and `bcc` ## [2.1.3] - 2022-10-11 ### Added - `Eco::API::UseCases::OozeSamples::OozeBaseCase` - `with_fields`, `with_sections` and `add_field` accept an `entry` parameter - also did some internal refactor ### Changed - Upgraded `ecoportal-api-v2` **gem** ### Fixed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - account for stages with updates within same entry ## [2.1.2] - 2022-09-29 ### Added - `Ecoportal::API::Session::Config#live_tree` to retrieve the tagtree of the back-end - Requires `graphql` connection parameters - `Ecoportal::API::Session#live_tree` see above ### Changed - `Ecoportal::API::Session::Config#tagtree` to use `#live_tree` if there isn't a `tagtree.json` file - upgraded **dependency** to `ecoportal-api-graphql` **gem** - upgraded **dependency** to `ecoportal-api-v2` **gem** ### Fixed - `Ecoportal::API::Session::Config::API#version_available?` **typo** ## [2.1.1] - 2022-09-26 ### Added - `Eco::API::Session::Config::Api#version_available?` to know if a version is available for use - `Eco::API::Session::Config::Apis`, added `#default_pass` and `#default_email` to use the `GraphQL` api. ### Changed - upgraded **dependency** to `ecoportal-api-graphql` **gem** - upgraded **dependency** to `ecoportal-api-v2` **gem** ## [2.0.68] - 2022-09-19 ### Added - `Eco::API::UseCases::OozeSamples::OozeBaseCase`: **added** a couple of functions to support **page creation**: `#new_page` and `#create_page` ### Changed - upgraded **dependency** to `ecoportal-api-graphql` **gem** - upgraded **dependency** to `ecoportal-api-v2` **gem** ### Fixed - `Eco::API::Session::Config::Api`, the `org_id` is **not** a required parameter for `APIv2` ## [2.0.67] - 2022-09-15 ### Added - **dependency** to `ecoportal-api-graphql` **gem** - Added integration for `GraphQL` - `session.api(version: :graphql)` - New base case `Eco::API::UseCases::GraphQL::Base` to create `GraphQL` use cases ### Changed - `Eco::CSV#read` and `Eco::CSV#parse` delegating `nil` row removal to sublcass `Eco::CSV::Table` - **upgraded** dependency on `ecoportal-api-v2` ### Fixed - `Eco::API::Session::Config::SFTP#remote_folder` to have path separator always as `/` - `Eco::CSV::Table` - to delete rows with all `nil` values - to keep `header` when file comes only with `header` row (with `0` count) ## [2.0.66] - 2022-08-11 ### Fixed - `Eco::API::UseCases::DefaultCases::Samples::Sftp` manage exception when trying to access remote folder ## [2.0.65] - 2022-08-11 ### Fixed - Typo of a fix ## [2.0.63] - 2022-08-11 ### Changed - `Eco::API::Session::Config::SFTP#remote_folder` to use native path builder ## [2.0.62] - 2022-07-15 ### Added - SFTP **password** option - `Eco::API::Common::Session::Sftp` fetches from config - `Eco::API::Session::Config::Sftp#password` ### Fixed - `Eco::API::UseCases::DefaultCases::CreateCase` had a typo ## [2.0.61] - 2022-07-11 ### Added - patch for `Ecoportal::API::Common::Client#host` exposed `host` property - `skip-header-checks` option - It prevents checks done in the `Eco::API::Common::People::DefaultParsers::CSVParser` - **Export Helpers** to be able to automate exports via `APIv2` - `Eco::API::UseCases::OozeSamples::Helpers::ExportableRegister` - `Eco::API::UseCases::OozeSamples::Helpers::ExportableOoze` - `Eco::API::UseCases::OozeCases::ExportRegisterCase` to export registers - First ooze native use case (besides the samples) ### Changed - upgraded `ecoportal-api-v2` to version `0.8.30` ### Fixed - `-entries-to-csv` case; option `-out` was not being used - `Eco::API::Common::People::Entries#export` made it so it creates one column per key - It was wrongly merging the entries assuming all of them had the same keys - This also fixes the `-entries-to-csv` case, which can be used with `entries-from` option to correctly merge multiple input files with no data loss - `Eco::API::UseCases::OozeSamples::RegisterExportCase` - On prompt to launch, it answers `Yes` - It correctly captures the `state` based on the stages `state` - It was not building the model - Optimized - It returns a `PageStage` (rather than `Page`), to ensure all supported properties are accessible (i.e. `uid`) ## [2.0.60] - 2022-07-01 ### Fixed - `Ecoportal::API::V1::PersonDetails.key?` patched ## [2.0.59] - 2022-06-07 ### Added - `Eco::API::Organization::TagTree#leafs` new method to spot tags with no children. ### Changed - `Eco::API::MicroCases#core_excluded` - when person is `new?`, you should still be able to exclude `filter_tags` ### Fixed - `Eco::API::Policies::DefaultPolicies::UserAccess` - `-exclude-account` should leave it untouched ## [2.0.58] - 2022-05-31 ### Added - **Usecase**`Eco::API::UseCases::DefaultCases::ClearAbilitiesTransCase` - invokable with `clear-abilities` - `Eco::API::Session::Config::People` added - `default_login_method` helpers - `Eco::API::Session::Config#default_login_method=` added - `Eco::API::Common::Loaders::Base#abort` method to log an error and raise an exception - **patched** `Ecoportal::API::Internal::Person` - Added a couple of handy helpers: `#replace_doc` and `#replace_original_doc` ### Changed - `Eco::API::Common::Session::SFTP#move` new parameter `override:` (default: `true`) - If there was an error, it would delete the destination remote file and retry to move the file - upgraded `ecoportal-api-v2` gem to `0.8.28` - `Eco::API::Organization::LoginProviders#login_provider` - Added support to fetch based on type (i.e. password, sso) - `Eco::API::Policies::DefaultPolicies::UserAccess` - Added support for `config.default_login_method` ### Fixed - `Eco::API::Common::People::EntryFactory` - Max allowed enconding errors was not working (it was just fixing all). ## [2.0.57] - 2022-04-29 ### Changed - `Eco::API::UseCases::DefaultCases::HrisCase` - Made it so the `leavers` batch runs first - This aims to prevent some errors such as `cyclic supervisor` or `email already taken` ## [2.0.56] - 2022-04-25 ### Added - `Eco::API::UseCases::OozeSamples::OozeBaseCase#add_field_by_doc` - Same as `#add_field` but using an existing _**doc**_ as a model ### Changed - `ecoportal-api-v2` dependency upgrade - `Eco::API::Common::Session::FileManager#file_content` - added parameter `mode:` to options can be used as well - `Eco::API::UseCases::OozeSamples::Helpers::Shortcuts#same_string?` - Added parameter `mild:` to compare the strings with only alphabetic characters - `Eco::API::UseCases::OozeSamples::OozeRunBaseCase` - `#main` and `#process_ooze` methods were not obvious to use - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` slight change on the **`run` summary message** ### Fixed - `Eco::API::UseCases::OozeSamples::OozeBaseCase#update_ooze` - Added call to `validate` also when we are on `dry-run` **mode** ## [2.0.55] - 2022-04-04 ### Fixed - `Eco::API::UseCases::DefaultCases::Samples::Sftp` should move the basename to Windows compatible chars. ## [2.0.54] - 2022-04-04 ### Added - `Eco::API::UseCases::DefaultCases::Samples::Sftp` should tell where the files went in the local. ## [2.0.53] - 2022-04-04 ### Added - `Eco::API::MicroCases#set_supervisor` prevent to set someone as supervisor of themselves. - `Eco::API::UseCases::DefaultCases::Samples::Sftp` integration to modify the `source_folder` ### Changed - upgrade `ecoportal-api` and `ecoportal-api-v2` dependencies ## [2.0.52] - 2022-03-04 ### Added - `Eco::API::UseCases::DefaultCases::CleanUnknownTags` include `default_tag` refresh ### Fixed - `Eco::Data::Files::Directory#dir_files` to be returned in alphabetic order ## [2.0.51] - 2022-02-27 ### Added - `Eco::API::MicroCases#person_update!` launches an update against the Server for one person - `Eco::API::MicroCases#take_email_from_account` with given an account associated to an `email` that we cannot take, it associates that account to a different email ## [2.0.50] - 2022-02-23 ### Added - Ability to configure delay between jobs and job groups - `Eco::API::Session::Batch::Jobs`, `#delay_between_jobs` - `Eco::API::Session::Batch::JobsGroups`, `#delay_between_groups` - `Eco::API::Session::Config`, added methods `#delay_between_jobs` and `#delay_between_job_groups` - New use case `Eco::API::UseCases::DefaultCases::TagPaths` to create a `csv` with all `tag` paths - Its purpose is to ease the build of tag remaps - Ideally, after remapping the tags of an org, you would want to fix the tag paths based on the current tagtree ### Changed - `workflow`, when no operation specified it logs as `info`, rather than `warn` ## [2.0.49] - 2022-02-14 ### Added - `Eco::API::Session::Batch::RequestStats#message` now it shows which details have changed - `Eco::API::UseCases::DefaultCases::ReinviteTransCase` the option `-force` will also send an invite to users that have accepted the invitation ## [2.0.48] - 2022-02-04 ### Changed - upgraded `ecoportal-api-v2` dependency ### Fixed - `Eco::API::Common::People::EntryFactory#get_file_content` - Call to `String#scrub` to prevent _invalid byte sequence_ error by replacing those characters by their coding identifier - This has been implemented with a max tolerance of 5 byte sequence errors - Errors are logged (although could not get to identify the line :/) ## [2.0.47] - 2022-02-03 ### Added - `Eco::API::UseCases::DefaultCases::CleanUnknownTags` - It is possible to extend or override `register_tags` - New command option `-include-register-tags` (will not ignore register tags; they will be removed too) - `Eco::API::UseCases::DefaultCases::Samples::Sftp` - Default sample case to list, get and archive SFTP remote files ### Changed - upgraded `ecoportal-api-v2` dependency ### Fixed - `Eco::API::Common::Session::S3Uploader#upload_file`: check if file exists before opening. ## [2.0.46] - 2021-12-24 ### Added - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - added counter of retrieved entries (to be able to compare with matched initially scoped results) - added also counter of failed to retrieve oozes - added also counter of double ups in search pagination - counter for updated pages and pages that failed update - `Eco::API::Session#enviro_name`: to identify in which environment we are running ### Changed - upgraded `ecoportal-api-v2` dependency - `Eco::API::UseCases::OozeSamples::OozeBaseCase#update_ooze` - To return `false` if there was request made to the server - To return `Reponse` if there was request made to the server ### Fixed - Changed the `workflow` in - `on(:end)` to do not recache people if there were no `:sync` or `:transform` cases - `Eco::API::UseCases::OozeSamples::OozeRunBaseCase#update_ooze` - It's parent had parameter (it as a child should so) - `Eco::API::UseCases::OozeSamples::OozeBaseCase#process_ooze` - It was not retrieving the `ooze` unless explicitly passed as parameter - This did not play well with child implementations that expect it to retrieve it based on `ooze_id` cli argument ## [2.0.45] - 2021-12-15 ### Added - `Eco::API::UseCases::OozeSamples::RegisterExportCase` ### Changed - Upgrade `ecoportal-api` dependency - Upgrade `ecoportal-api-v2` dependency ## [2.0.44] - 2021-11-25 ### Changed - Upgrade `ecoportal-api` dependency ## [2.0.43] - 2021-11-25 ### Added - `Eco::API::Session::Batch::Job` added better **logging** ### Changed - `Eco::API::Session::Batch` added **resilience** and **recovery** to connection errors - `Eco::API::Policies::DefaultPolicies::UserAccess` changed logging from `warn` to `info`. ## [2.0.42] - 2021-10-30 ### Added - `eco/api/organization/presets_values.json` added abilities: - `visitor_management` - `broadcast_notifications` - `cross_register_reporting` - Due to dev pipeline, the `ecoportal-api` version `0.8.4` hasn't been released - This part of the current `eco-helpers` version depends on that gem version (to be upgraded later) - Changed the `workflow` in - `before(:post_launch, :usecases)` => post launch cases are not prevented for **partial** updates - rectified message - `run(:post_launch, :usecases)` => missing **people** error will log in `debug` level - it won't break the script anymore (just prevent a post use case to be run) - New use case `Eco::API::UseCases::DefaultCases::EntriesToCsv`: to export input entries as `csv` - invokable via `-entries-to-csv` - More errors: - `Eco::API::Error::ExternalIdTaken` - `Eco::API::Error::InternalServerError` - **Added** option `processed-people-to-csv file.csv` to export a `csv` with the results of processing people - This option allows to preview the final data when launching a `dry-run` (`-simulate`) - **Added** ooze case sample `Eco::API::UseCases::OozeSamples::TargetOozesUpdateCase` - Allows to retrieve the target entries based on a `csv` ### Changed - Moved methods of `#person_ref`, `#get_attr` and `#get_row` as **class methods** of `Eco::API::Session::Batch::Feedback` - `Eco::API::Session::Errors` methods above to use them via `Feedback` class - `Eco::API::Session::Errors::ErrorCache`: **added** new property `response` - `#by_type` added parameter `only_entries` to specify the output type - `#errors` capture the `response` in the generated `ErrorCache` object ### Fixed - `Eco::API::Session::Config::Workflow#run` to validate **callback** output class - It should be a `Eco::API::UseCases::BaseIO` - Prevent **uncreated people** to be present in queues or people refresh (if the server side worked perfectly, this contingency shouldn't be necessary): - `Eco::API::Session::Batch::Job#processed_queue` - Sanity-check to exclude people that are **new** and do not have `id` when the current `Job` is **not** of type `:create` (meaning that it was supposed to be created but failed and it probably doesn't exist on server-side) - This prevents errors when trying to update/delete a person that most probably does not exist on the server. - `Eco::API::MicroCases#people_refresh` - Remove from people run-time object those that are **new** that are `dirty` (with pending changes) ## [2.0.41] - 2021-10-06 ### Fixed - `Eco::API::Session::Batch::Job` `backup_update` - Saved `requests` filename was overlapping due to only batch job type being used - Now it uses the name of the batch job as well ## [2.0.40] - 2021-09-29 ### Added - Unique access point for `validation` via core case `Eco::API::UseCases::OozeSamples::OozeBaseCase#update_ooze` ## [2.0.39] - 2021-09-28 ### Changed - `Eco::API::UseCases::OozeSamples::OozeBaseCase` - Moved helpers from `Eco::API::UseCases::OozeSamples::OozeUpdateCase` ### Fixed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - fix launch condition to be `Y` - fix `search` method call - Changed the `workflow` to prevent re-cache of people when `people` was not used ## [2.0.38] - 2021-09-07 ### Added - `Eco::CSV::Table` some more helpers to manage input `csv`s - `#transform_headers` that allows to pass a block to decide the new name - `#merge_same_header_names` that allows to deal with value of columns with same header name - `#duplicated_header_names` that identifies repeated header names ### Changed - Changed the `workflow` to prevent re-cache of people when `people` was not used ## [2.0.37] - 2021-09-03 ### Added ### Changed ### Fixed - `Eco::API::UseCases::OozeSamples::OozeBaseCase` - `#update_ooze` only count dry run for changed pages (to have better feedack) - stop downloading the people manager - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - prevent queuing non page objects ## [2.0.36] - 2021-08-31 ### Fixed - `Eco::API::UseCases::OozeSamples::OozeBaseCase` - `#update_ooze` only count dry run for changed pages (to have better feedack) ## [2.0.35] - 2021-08-30 ### Added - `Eco::API::UseCases::OozeSamples::OozeBaseCase` - `#new_target` optional warning when switching `target` - `block` that is called when switching target and there were unsaved changes - `#dirty?` helper method to check if there are changes - `#before_loading_new_target` hook to allow child classes to anticipate when the `target` is going to change ### Changed - `Eco::API::UseCases::OozeSamples::Helpers::Shortcuts#object_reference` improved reference text - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - added resilience when switching target (i.e. from one stage to another stage in same entry) - added `batch_queue` ### Fixed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - actual `batch_size` updates - actual safe switch of target (i.e. against another stage of same ooze) ## [2.0.34] - 2021-08-28 ### Added - `Eco::API::UseCases::OozeSamples::OozeBaseCase` refactored ooze base case - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` new case for full register update ### Changed - `Eco::API::UseCases::OozeSamples::OozeRunBaseCase` made child of `OozeBaseCase` and simplified to its essential - `Eco::API::UseCases::OozeSamples::OozeUpdateCase` remove unnecessary code and helpers that are now inherited from `OoozeBaseCase` - `Eco::API::UseCases::OozeSamples::OozeFromDocCase` remove unnecessary code ## [2.0.33] - 2021-08-16 ### Added - `Eco::API::UseCases::OozeSamples::OozeFromDocCase` use case to abstract form from doc - `docx` dependency - A couple more of helpers for the Ooze Cases: `#titleize` & `#normalize_string` ### Changed - `ecoporta-api-v2` **gem** (upgrade dependency) ### Fixed - `Eco::API::UseCases::OozeSamples::OozeUpdateCase`, helper `with_stage` ## [2.0.32] - 2021-07-14 ### Fixed - `Eco::API::UseCases::OozeSamples::OozeUpdateCase` prompting user, fixed typo - `Eco::API::Session::Batch::Job`: `include-excluded` again... typo. ## [2.0.31] - 2021-07-13 ### Fixed - `Eco::API::Session::Batch::Job`: `include-excluded` was triggering a type error. ## [2.0.30] - 2021-07-08 ### Added * `Eco::API::Common::People::DefaultParsers::XLSParser` uses as default the `fields_map.json` to identify the headers. ### Fixed * `Eco::API::Common::People::DefaultParsers::XLSParser` should return all `String` values ## [2.0.29] - 2021-07-08 ### Fixed - `Eco::API::Common::People::PersonEntryAttributeMapper#details_attrs` * What a mess this was doing to the `csv` export :/ ## [2.0.27] - 2021-07-05 ### Changed - Parent class `Eco::API::UseCases::DefaultCases::ToCsvCase` shouldn't know header maps necessary for `Eco::API::UseCases::DefaultCases::ToCsvDetailedCase` * Moved related header maps to `ToCsvDetailedCase` ### Fixed - `--help` should work fine now - Attribute parsers that depended on indirect parser attributes were **not** included - **changed** a couple of classes - `Eco::API::Common::People::PersonEntryAttributeMapper`, where methods should receive `data` to re-scope if the data is available (most specifically `#internal_attrs`) - `Eco::API::Common::People::PersonEntry`, where when setting the final values on `Person`, it should include any internal attribute that is present in the `final_entry` (the result of all the parsing process) - `Eco::API::Common::People::DefaultParsers::CSVParser` - indirect attributes that depended on other indirect attributes would show as missing even if they were active - i.e. `name` depends on `first-name` & `surname`, **AND** `details-name` depends on `name` ## [2.0.26] - 2021-06-25 ### Added - `Eco::API::MicroCases#set_supervisor`, tries to keep in sync the `#subordinates` **count** of previous and new supervisor - new **option** `-run-postlaunch` to run post launch cases, even when we run in `dry-run` mode * when in `dry-run` it will **not** reload the people base of the session - new **option** to append **new** entries to the `People` object * **invokable** on **cli** via `-append-starters` (`{people: {append_created: true}}`) * the following use cases include this option: * `Eco::API::UseCases::DefaultCases::UpsertCase` * `Eco::API::UseCases::DefaultCases::HrisCase` * `Eco::API::UseCases::DefaultCases::CreateDetailsWithSupervisorCase` * `Eco::API::UseCases::DefaultCases::CreateDetailsCase` * `Eco::API::UseCases::DefaultCases::CreateCase` * the option involves a new keyed argument `:append_created` in a couple of `MicroCases` * `Eco::API::MicroCases#with_each`: where internally the search is performed against a copy of the `People` object. * `Eco::API::MicroCases#with_each_starter` * when `--help` is invoked option to filter the shown `-options`, `-usecases` and `filters` by a word contained in the option. - **added** `csv` **header checks** for feed files, which entailed some changes: * `Eco::API::Common::Loaders::Parser` - new **subclass** `RequiredAttrs`, creatred when calling `.active_when_all` and `.active_when_any` - **dependency** injection via `.dependencies` as `{required_attrs: RequiredAttrs}` * **added** `Eco::API::Common::People::PersonParser#required_attrs` to offer all the `RequiredAttrs`, where defined - the **new method** `#required_attrs` to expose the injected `RequiredAttrs` * **new** keyed argument `check_headers:` in `Eco::API::Common::People::EntryFactory#entries` - subsequent changes to accommodate the new param in `Eco::API::Session#csv_entries` - `eco/cli/config/default/input` calls using this param to `true` * `Eco::API::Common::People::DefaultParsers::CSVParser` - added option `check_headers` via `dependencies` that enables the headers check - it will now offer detailed warning messages on what can happen with the **missing headers** * it will also list the **unknown header** names ### Changed - `Eco::API::MicroCases#set_supervisor`, the order of the 2 first parameters - `Eco::API::Organization::People`: internally `@by_id` cache Hash included `nil` values => **not** any more. - removed **unused** methods on **patches** for `Ecoportal::API::V1::Person` and `Ecoportal::API::Internal::Person` * specifically `#reset_account!` and `#consolidate_account!` as well as `#reset_details!` and `#consolidate_details!` - internal changes in `Eco::API::Common::People::Entries#entry` * **added** option to trigger `MultipleSearchResults` StandardError when multiple candiates are found. * **removed** `nil` values from the `caches` (the Hashes to optimize the search) - slight structure refactor of `Eco::API::Common::Loaders` * moved base class to subfolder/namespace * decoupled pure `Loader` logics to `Loaders::Base` and use case inheriance chain loader to `Loaders::CaseBase` - `Eco::API::Session::BatchJob` the `post_launch`: * sets the `id` to the `person` if it was **created** successfully * when in `dry-run` it fakes the `id` with a counter - `Eco::API::Common::People::PersonFactory` gets `subordinates` initialized to `0` (when **creating** a `new` person) ## [2.0.25] - 2021-06-23 ### Added - `Eco::API::UseCases::DefaultCases::HrisCase` validation error to require `-schema-id` command line when there are people in schemas other than the active one ### Changed - `Eco::API::Session::Batch::Job` * for backwards compatibility `-include-only-excluded` should bring an options structure compatible with `-include-excluded` ### Fixed - `Eco::API::Session::Batch` fixed typo that would prevent `prompt_user` to work ## [2.0.24] - 2021-06-22 ### Added - `Eco::API::Session::Batch::Job` made **native** `-include-excluded` * also added new option `-include-only-excluded` to be able to only target people HRIS excluded ## [2.0.23] - 2021-06-22 ### Added - `Eco::API::Session::Batch::Job` **new** option (`-save-requests`) to save requests even if in `dry-run` (`-simulate`) ### Changed - `Eco::API::Session::Batch::Job` new people won't create updates unless they have either details or account * because that entry is not supposed to be created unless has account or details ## [2.0.22] - 2021-06-18 ### Added - exposed `logger` in `BaseLoader` and - support for multiple input files * `Eco::API::Common::People::EntryFactory#entries`: - refactored to allow multiple input files parsing - moreover to `idx`, hash entries will get their `source_file` * Input callback at `lib/eco/cli/config/default/input` refactored format detection and enabled folder input * `SCR.get_file` language extended to also mention folder (not just file) - support for `.xls` and `.xlsx` files * `Eco::API::Common::People::DefaultParsers::XLSParser` the Excel files **parser** * `Eco::API::Common::People::PersonParser` added `:xls` as an accepted format * `Eco::API::Session#fields_mapper` exposed mapper through a method to allow **headers detection** - The external names of the fields are the column headers of the input file * `Eco::API::UseCases::BaseIO` when arguments validation rails, now it raises with specific `MissingParameter` error ### Changed - dry out `BaseLoader` (only session is set as instance variable) - removed `creek` **dependency** (it was not used anywhere in the gem) * we just kept `roo` and `roo-xls` - custom `Error` classes now all inherit from `StandardError` (rather than `Exception`) ## [2.0.21] - 2021-06-04 ### Added - `Eco::CSV::Table`, support to create the table out of an `Array` - This opens new methods to transform input Excel file to this data structure and unify input data structures. - **new** use case `Eco::API::UseCases::DefaultCases::CleanUnknownTags` invokable via `clean-unknown-tags` ### Changed - `Eco::API::Common::People::EntryFactory` slight **refactor** to boost better support for multiple input formats ## [2.0.20] - 2021-05-31 ### Added - **dependencies** to `creek`, `roo` and `roo-xls` - **dependencies** to `hashdiff` - `Eco::API::Session#parse_attribute` => added missing parameter `deps:` - new option `-stdout [file]` to redirect the output to a file - `Eco::CSV::Table`, **added** more helper methods `#group_by`, `#transform_values`, `#slice`, `#slice_columns`, `#delete_column` - `Eco::API::Organization::TagTree` **added** more helper methods: `top?`, `tag=`, `as_json`, `dup`, `diff` ### Fixed - `Exception` patch: when `SystemStackError` there is not `backtrace` :/ ## [2.0.19] - 2021-05-31 ### Added - Better error message for people searches & **offer** to select among the candidates: - `Eco::API::Organization::People::MultipleSearchResults`, triggered from `Eco::API::Organization::People#find` - `Eco::API::MicroCases#with_each` will offer the selection of candidates ### Changed - **renamed** and repurposed `Eco::API::Organization::PeopleAnalytics` to `PeopleSimilarity` ### Fixed - `Eco::Data::FuzzyMatch` adjustments for configuration propagation + some fixes - Command option `-entries-from` can still be useful when used to obtain `-get-partial` of people base for `:export` use cases !! ## [2.0.18] - 2021-05-25 ### Added - **`-one-off`** option to not having to type the `-api-key` every time you launch one-off scripts - `-api-key` will store the key to the `./.env_one_off` file (supports update and multi-environment) ### Fixed - patched `Exception#patch_full_message` to do not enter into a cyclic error rescue - also rescue on `workflow.rescue` ## [2.0.17] - 2021-05-25 Specific changes due to eP **release `1.5.9.70`** (_Policy Group Abilities_) - And some improvements as well as new tools ### Added - `Eco::API::Organization::PresetsFactory` added integrity validation for `person_abilities` ability - `Eco::API::Organization::PresetsFactory` - `#validate`: returns an `Array` with all the errors that a `permissions_custom` has - `#valid?`: checks if a `permissions_custom` is valid - `Eco::API::Organization::PeopleAnalytics`: a **helper** class to identify things in the People Manager and provide mitigation action methods to resolve them. - Added dependencies to `fuzzy_match`, `amatch` and `jaro_winkler` **gems** - `Eco::Data::FuzzyMatch` with string match helpers and a set of home-made generic libs. - `Eco::API::Organization::PeopleAnalytics` to launch analysis on the People Manager - `Eco::API::UseCases::DefaultCases::AnalysePeople` invokable via `-analyse-people` - **new** -> a way to define a hierarchy of options (at least of 1 Level) - `API::CLI::Config::OptionsSet` - `API::CLI::Config::UseCases::CaseConfig` - Integrated the new feature to the `--help` command and methods. - **Usecase** `Eco::API::UseCases::DefaultCases::ResetLandingPageCase` added parameter to specify `-page-id` - `Eco::API::Common::BaseLoader` new shortcut methods `#micro` (_MicroCases_), `#session` and `#config` - At this stage of the execution workflow it uses `ASSETS.session` - **Important note**: when the `#parser` or `#serializer` are called the `ASSETS.session` might already be linked to the specific invoked environment - New method helpers in `Ecoporta::API::MicroCases` - `preserve_filter_tags`, `preserve_default_tag` and `preserve_policy_groups` ### Changed - upgraded dependency on `ecoportal-api` and `ecoportal-api-v2` - **removed** `Eco::API::MicroCases#refresh_abilities` - `Eco::API::MicroCases#set_account` **removed** `refresh_abilities` - `Eco::API::MicroCases#append_usergroups` **removed** `refresh_abilities` - **removed** _usecase_ `Eco::API::UseCases::DefaultCases::RefreshAbilitiesCase` (`-refresh-abilities`) - `Eco::API::Policies::DefaultPolicies::UserAccess`: **removed** `refresh_abilities` - **removed** `Eco::API::Session#new_preset` - `Eco::API::Organization::PresetsFactory` - **removed** `rspecs` - `.new`: **removed** parameters `presets_custom` & `presets_map` - **removed** constants `DEFAULT_CUSTOM`, and `DEFAULT_MAP` - **removed** private methods `#presets_custom` and `#presets_map` - **changed** private method `#compile` receives directly an array of `permissions_custom` - `Eco::API::Session::Config` **removed** methods `#presets_custom=` & `presets_map=` - `Eco::API::Session::Config::People` **removed** methods `#presets_custom=`, `#presets_map=`,`#presets_custom` & `#presets_map` - **removed** `eco/api/organization/presets_reference.json` - **moved** case-specific options to only be active when the user case is previously invoked in the command line. ### Fixed - **handle** `Ecoportal::API:Errors::TimeOut` in `Eco::API::Session::Batch` by offering to retry. ## [2.0.16] - 2021-05-04 ### Added - Use case `Eco::API::UseCases::DefaultCases::SupersCyclicIdentify`, invokable via `-identify-cyclic-supers` - Use case `Eco::API::UseCases::DefaultCases::AbstractPolicyGroupAbilities`, invokable via `-abstract-policygroup-abilities` - Option to run `one-off` scripts, without org configurations: 1. `-api-key INTERNAL_API_KEY` 2. `-enviro [live|pre.dev]` 3. `-org NAME_OF_ORG` ## [2.0.15] - 2021-04-29 ### Added - Use case `Eco::API::UseCases::DefaultCases::SupersHierarchy`, invokable via `-supers-hierarchy` ### Fixed - `eco/cli/config/default/workflow.rb` prevent `rescue` looping ## [2.0.14] - 2021-04-15 ### Added - `Eco::API::UseCases::DefaultCases::ToCsvCase` added option `-internal-names` to avoid overriding data on export - `Eco::API::Common::People::PersonEntry#mapped_entry` exposed method for raw `csv` generation - `Eco::API::Organization::PresetsFactory` added integrity validation for `person_*` abilities - `Eco::API::Session::Batch::Job` more debug info on erron handlers ### Fixed - `Eco::API::Error.get_type` was almost always matching `Eco::API::Error::Unclassified` -> fixed ## [2.0.13] - 2021-03-31 ### Added - Stats on the `Eco::API::Session::Batch` - Allow to inherit and re-use the `Eco::API::UseCases::DefaultCase::HrisCase` ### Fixed - Ensure auto-loading for `Eco::API::UseCases` ## [2.0.12] - 2021-03-29 ### Changed - `Eco::CLI#run` it does include any defined states on the workflow ## [2.0.11] - 2021-03-29 ### Fixed - `Eco::API::Session::Batch:Errors#errors` changed `Array#filter` call to `Array#select` call ## [2.0.10] - 2021-03-26 ### Added - `Eco::API::Common::People::PersonParser` - `#defined_attrs`: list of all attribute defined parsers (regardless they belong to the model) - `Eco::API::Organization::TagTree` methods - `#total_depth` to know the total depth of a tree - `#flat?` to know if the tagtree has only 1 level ### Changed - `Eco::API::Common::People::PersonParser` - Renamed `#all_attrs` to `#all_model_attrs` - Ranamed `#defined_attrs` to `#defined_model_attrs` - Ranamed `#undefined_attrs` to `#undefined_model_attrs` ## [2.0.9] - 2021-03-19 ### Changed - `Eco::API::Session::Batch:Errors#person_ref` moved to the public method ## [2.0.8] - 2021-03-09 ### Fixed - `Ecoportal::API::V1::Person#identity` adjust behavior ## [2.0.7] - 2021-03-09 ### Fixed - `Eco::API::Session::Batch::JobsGroups` and `Eco::API::Session::Batch::Jobs`: when new `Batch::Job`s are creating during launch, they remained unlaunched - this fix makes `#launch` method to iterate until there are no pending ## [2.0.6] - 2021-03-08 ### Changed - `Eco::API::Session::Batch:Errors` moved some methods to be private ### Fixed - `Eco::API::Error` should inherit from `StandardError`, rather than from `Exception` ## [2.0.5] - 2021-02-24 ### Fixed - `Eco::API::Common::People::PersonParser#symbol_keys` to use `Array#select` - as `Array#filter` was introduced in ruby `2.5.5` ## [2.0.4] - 2021-02-23 ### Changed - `Eco::API::Common::People::PersonParser#defined_attrs` to include virtual attributes ## [2.0.3] - 2021-02-23 ### Added - `Eco::API::UseCases::OozeSamples::OozeUpdateCase`: added integration to update page instances (non-templates) ### Fixed - `Eco::API::Policies::DefaultPolicies::UserAccess` complete default policy code. ## [2.0.2] - 2021-02-22 ### Changed - upgraded dependencies with `ecoportal-api` ## [2.0.1] - 2021-02-22 ### Changed - upgraded dependencies with `ecoportal-api-oozes` to `ecoportal-api-v2` ## [1.5.15] - 2021-02-17 ### Added - `Eco::API::Common::ClassHelpers` added support for class methods inheritance - this is key to be able to define usecase models to inherit from - `Eco::API::UseCases::OozeSamples::OozeUpdateCase`: added this sample to inherit from (simplifying use cases code) - `Eco::API::Common::ClassHelpers` added inheritable attribute values - added benchmarking to people loaders: - `Eco::API::MicroCases#people_load` - `Eco::API::MicroCases#people_cache` - `Eco::API::MicroCases#people_search` - `Eco::API::MicroCases#refresh` ### Fixed - `Eco::API::Policies::DefaultPolicies::UserAccess` typos in default api policy ## [1.5.14] - 2021-02-05 ### Added - `Eco::API::Policies::DefaultPolicies` policies that are run always (after the custom policies) - `Eco::API::Policies::DefaultPolicies::UserAccess`: - remove account if there's no `email` - provision min user level to those with account (if no usergroup and no abilities) - `Eco::API::Session#policies` which merges the default policies to be added/run after the custom policies - `Eco::API::Common::Session::Logger`: add caching of logs - `Eco::API::Common::Session::Logger::Cache` new class to manage cached logs - `Eco::API::Common::Session::Logger::Log` new class to have a trace on logs - `Eco::API::Session::Batch::Job#summary` added subjobs (error handlers) summary ### Changed - `Eco::API::Session::Batch::Job#launch` it will also run the default api policies before feedback and query launch - `Eco::API::Common::People::PersonEntry` add error log when wrong email error is detected - previously it would have crashed ## [1.5.13] - 2021-02-01 ### Changed - upgraded dependency with `ecoportal-api-oozes` ### Fixed - `Eco::API::Session::Config::Api` was not including the correct `host` - this could have launched an `api` request to `live.ecoportal.com` when targeting `pre.dev` ## [1.5.12] - 2021-02-01 ### Added - `Eco::API::Common::People::DefaultParsers::CSVParser` when cell content is `Null`, capture `nil` value. ### Changed - upgraded `ecoportal-api` dependency ## [1.5.11] - 2021-01-25 ### Added - `Eco::API::Organization::TagTree#subtag?` to check if the tag is in any subtree. ### Fixed - `Eco::API::MicroCases#set_supervisor` shouldn't set it if the entry does not have it. ## [1.5.10] - 2021-01-19 ### Fixed - `Eco::API::Session::Batch::Errors#print` show the row number of the input data. ## [1.5.9] - 2021-01-08 ### Added - `Eco::API::Organization::TagTree#subtags` to get all the tags but those of the highest level. ## [1.5.8] - 2021-01-05 ### Fixed - `Eco::API::Session::Batch::Jobs#job` shouldn't be calling the post-launch callback function on creation. - `Eco::API::Session#new_job` should include a `&block` parameter. - `Eco::API::UseCases::DefaultCases::RefreshCase`: fixed typo ## [1.5.7] - 2020-12-17 ### Fixed - `Eco::API::Sesssion#parse_attribute` was not using phase argument ## [1.5.6] - 2020-12-04 ### Fixed - `Eco::API::UseCases::DefaultCases::RestoreDBCase` fixed typo and slightly improved - fixed some back-end errors when chaining usecases - `Eco::API::UseCases::DefaultCases::OrgDataConvertCase` improved ## [1.5.5] - 2020-12-03 ### Fixed - rubies previous to `2.5` do not have `yield_self` ## [1.5.4] - 2020-12-02 ### Added - update `ecoportal-api` dependency ### Fixed - `Eco::API::MicroCases#people_refresh` typo ## [1.5.3] - 2020-11-30 ### Fixed - `Eco::API::Session::Batch::RequestStats#blanked_value?` better blank detection - `Eco::API::MicroCases#with_each_starter` rectified typo ## [1.5.2] - 2020-11-26 ### 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` 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 - `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::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 ## [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 ### Fixed - preserve backtrace on logging ## [1.4.0] - 2020-07-14 ### 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 ### Fixed - preserve backtrace on logging ## [1.3.18] - 2020-07-08 ### Fixed - the `update` case was missing the code to use the `default_usergroup` ## [1.3.17] - 2020-07-06 ### 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 ## [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` ## [1.3.13] - 2020-05-29 ### 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 ### Changed - stop using `email` as `external_id` on `People#person` & `People#find` * this should result in more accurate searches when using `:strict` options ## [1.3.11] - 2020-05-12 ### Changed - remove popping up comments on `Eco::API::Organization::PolicyGroups#` ## [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` ### Fixed - `upsert`, `hris` and `create` usecases: fixed condition for use of default_usergroup ## [1.3.9] - 2020-05-12 ### 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.