# Change Log All notable changes to this project will be documented in this file. ## [3.0.14] - 2024-09-xx ### Added ### Changed ### Fixed - sftp errors ## [3.0.13] - 2024-09-10 ### Fixed - sftp errors ## [3.0.12] - 2024-09-06 ### Fixed - Enable multiple classifications per location node on updates - `Eco::API::UseCases::GraphQL::Helpers::Location::Base::ClassificationsParser` - `#to_classification_ids` split on `|` - `Eco::API::UseCases::GraphQL::Helpers::Location::Command::Diff::AsUpdate` - `#diff_hash` ## [3.0.11] - 2024-09-06 ### Changed - Prevent double-up of notifications - Prevent double log of errors ## [3.0.10] - 2024-09-05 ### Fixed - wrong sftp error constant path ## [3.0.9] - 2024-09-05 ### Fixed - `Eco::API::Common::Session::SFTP#move` fixed error handling. ## [3.0.8] - 2024-08-30 ### Added - options to choose `-batch-mode` [`:batch`|`:job`] ### Changed - When `-skip-api-policies` - Default policy: to skip non generic logic when api policies are skept - Still run default policies ### Fixed - unknown option `suggestions` ## [3.0.7] - 2024-08-27 ### Added - `Eco::API::UseCases::GraphQL::Helpers::Base::ErrorHandling` ### Fixed - `Service:TreeUpdate` - Should NOT call `re_archive` when there was a error that is NOT due to an interrupt (i.e. so when raised **error** or `exit`ed) ## [3.0.6] - 2024-08-26 ### Added ### Changed - `Eco::API::Microcases#people_search` - Change to `silence: false` by default - `Eco::Language::AuxiliarLogger#log` - prevent call if `logger` object doesn't have method - Various refactors - Upgrade `ecoportal-api-v2` **gem** - `Eco::API::UseCases::Cli` - Made **inheritable** the class vars: `description`, `cli_name`, `callback`, and `options` - Move case options to self-contained **cli** class - `-restore-db` - `-reinvite`, `-reinvite-from` - `-codes-to-tags` - `-tagtree-paths` (prev: `-create-tag-paths`) - `-analyse-people` - `-org-data-convert` - `-identify-cyclic-supers` - `-supers-hierarchy` ### Fixed - `Eco::API::Common::People::PersonEntryAttributeMapper` - method `#to_internal`, was missing to correcty return `attr` - `Eco::Csv::Split` - missing attr writers for `total_count` and `copy_count` - CLI **suggestions**: when no suggestions / corrections, show still the unknown option. - `Eco::API::Organization::TagTree` - fix paths tracking - `Eco::API::Organization::LoginProviders` - identify `magic_link` ## [3.0.4] - 2024-08-14 ### Added - `Eco::Csv::Split` add `total_count` and `copy_count` - `Eco::API::Common::People::PersonParser` - added core attribute `brand_id` ## [3.0.3] - 2024-08-13 ### Added - `login_provider_ids` parser - Natural options for `sso` and `magic_link` - This links with people imports spreadsheet ## [3.0.2] - 2024-08-09 ### Changed - upgraded gem dependencies - `ecoportal-api-graphql` ## [3.0.1] - 2024-08-09 ### Added - `GraphQLSchema` case to extract the schema in a json file ### Changed - `SplitCsv` case namespace ### Fixed - have `Eco::VERSION` defined ## [3.0.0] - 2024-08-01 - require `ruby 3` ### Fixed - have `Eco::VERSION` defined ## [2.7.25] - 2024-08-01 ### Added - `Eco::API::Organization::LoginProviders#to_id` - added support for `:magic_link` and `:magiclink` ### Changed - `-get-partial` switches to full people download when it the input file surpases `MAX_GET_PARTIAL` ## [2.7.24] - 2024-07-30 ### Fixed - `Eco::API::Common::People::PersonEntry#set_core` - Exclude setting `id` (should invariably be set via back-end only) ## [2.7.23] - 2024-07-29 ### Fixed - Filename and path scoping ## [2.7.22] - 2024-07-26 ### Changed - Patch on exception: to show cause - `Eco::Common::Session::FileManager` - `load_json` prevent avoidable memory leaks - `save_json` prevent avoidable memory leaks ## [2.7.21] - 2024-07-13 ### Added - Ability to skip GraphQL schema fetch (`GRAPHQL_FETCH_SCHEMA`) ### Changed - `-clean-unknown-tags` case - option for `clean-archived-nodes` by default it won't clean them ## [2.7.20] - 2024-07-11 ### Fixed - Patch on exception ## [2.7.19] - 2024-07-10 ### Fixed - Patch on exception ## [2.7.18] - 2024-07-01 ### Changed - `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeToList` - Custom input node parsers: yield has_node and node as well. - `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeDiff` - Exclude archived nodes from the file as **default** ## [2.7.17] - 2024-06-22 ### Added - **Stop on uknown** options will try to offer suggestions from now on - `Eco::CSV::count` class method to stream-count the number of rows - Option `-start-at` allows to start the count at certain row idx ### Changed - Added options to case `-split-csv` - `-start-at` - `-simulate` a dry-run will return the count and won't generate the files. - `Eco::CSV::split` - the `block` allows to filter what rows should be included ### Fixed - `Workflow::Mailer`: shouldn't send notification when there is an **error** that doesn't really need to be notified. - `to-csv` case should accepte target folder as an argument - `options_set` sort namespaces ## [2.7.16] - 2024-06-18 ### Fixed - `RegisterUpdateCase` filters ## [2.7.15] - 2024-06-18 ### Fixed - `Eco::API::Common::People::EntryFactor` super must be called before ## [2.7.14] - 2024-06-13 ### Fixed - `update_tags_remap_table` to build table on **dry-run** too - See `Eco::API::UseCases::GraphQL::Samples::Location::Command::TrackChangedIds` ## [2.7.13] - 2024-06-13 ### Added - Case `-split-csv` - Case `-remap-tags` on people case ### Changed - `close_handling_tags_remap_csv` will display table on dry-run too - See `Eco::API::UseCases::GraphQL::Samples::Location::Command::TrackChangedIds` ## [2.7.12] - 2024-05-30 ### Changed - Decouple `Eco::API::UseCases::Default::People` namespace ## [2.7.11] - 2024-05-27 ### Changed - `Eco::API::Common::Session::SFTP#download` - It now returns the local filename(s) of the downloaded files. - `Eco::API::UseCases::GraphQL::Utils#sftp_download_files` - It now returns the local filename(s) of the downloaded files. ## [2.7.10] - 2024-05-20 ### Changed - Temporarily silent warnings on tracking id changes (apparently the tracking locations tree is not up to date with latest version and gives false warnings) - Upgrade SFTP access ### Fixed - Remove enviro from tagtree download ## [2.7.9] - 2024-05-16 ### Fixed - `Eco::Data::Locations::NodeDiff::NodesDiff#unarchive` - It must include archived nodes that will receive new children ## [2.7.8] - 2024-05-16 ### Added - `Eco::API::UseCases::GraphQL::Helpers::Location::Command:Result` - Feedback original command. ### Changed - upgraded `ecoportal-api-graphql` gem - able to skip email via options (`-no-email`) ## [2.7.8] - 2024-05-xx ### Added - `Eco::API::UseCases::GraphQL::Helpers::Location::Command:Result` - Feedback original command. ### Changed - upgraded `ecoportal-api-graphql` gem - able to skip email via options (`-no-email`) ### Fixed ## [2.7.7] - 2024-05-16 ### Fixed - `Eco::API::UseCases::OozeSamples::TargetOozesUpdateCase` - default prompt to user to `Y` when in remote mode. ## [2.7.6] - 2024-05-16 ### Changed - upgraded `ecoportal-api-graphql` gem, and `ecoportal-api` gem - `Eco::API::Common::People::Entries` (**optimization**) - Remove supervisors order - It could create cyclic supervisors. - `Eco::API::MicroCases#set_supervisor` slight improvemnent to prevent cyclic supers (self + added one to one) ### Fixed - `Eco::API::UseCases::GraphQL::Helpers::Location::Command::Diff::AsUpdate` - `classificationIds` should be always an `Array` ## [2.7.5] - 2024-05-07 ### Fixed - `Eco::API::UseCases::GraphQL::Utils` typo ## [2.7.4] - 2024-05-07 ### Fixed - Loading of tree diff / update service ## [2.7.3] - 2024-05-07 ### Changed - upgraded `ecoportal-api-graphql` - Mailer - heading of errors and warnings: added **ALL** to state clearly that all warnings and errors come thereon - Batch Errors: removed _batch_ wording, as it refers to a single action in the batch ### Fixed - Tree diff helpers loading (load as if concern) ## [2.7.2] - 2024-04-23 ### Added - **Parsers** - Native **number parser**, added _warning_ when number cannot be parsed ## [2.7.1] - 2024-04-23 ### Fixed - `Eco::Language::AuxiliaLogger` prioritize `session.logger` in the object scoping process. ## [2.7.0] - 2024-04-23 ### Added - **support** for node **classifications** on - `Eco::Data::Locations::NodePlain` - `Eco::API::Organization::TagTree` - It `downcase` the classification values - added class `Eco::API::Organization::NodeClassifications` - `#node_classifications` method in `session`, `session.config` and in `config.tagtree` - **validation** helpers via locations base case (`Eco::API::UseCases::GraphQL::Helpers::Location::Base::ClassificationsParser`) - Use case (**made native**) - `-tagtree-upload` => `Eco::API::UseCases::Default::Locations::TagtreeUpload` - it can target specific tree via `-structure-id` cli argument - it has some **optimizations** such as: 1. Only backing up the tree once (before) 2. Not graphql querying the tree as a response of each batch commands request - Parameter `-file-as-source` for `-tagtree-extract` provided that the case can **convert** input tree csv files into a list of nodes (`Eco::API::UseCases::Default::Locations::TagtreeExtract`) - **Tagtree UPDATE** case helpers. Added three service modules for quickly building **custom tagtree update cases**. See: 1. `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeToList` 2. `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeDiff` 3. `Eco::API::UseCases::GraphQL::Samples::Location::Command::Service::TreeUpdate` - `snake_case` helper (at `Eco::Data::Strings::SnakeCase`) - `camel_case` helper (at `Eco::Data::Strings::CamelCase`) - `camel_case` helper (at `Eco::Data::Strings::CamelCase`) - snake vs camel indifferent access helper (at `Eco::Data::Hashes::SnakeCamelIndifferentAccess`) - **Optimization** helper classes to cluster node diffs: - `Eco::Data::Locations::NodeDiff::NodesDiff::ClusteredTreeify`: key helper - `Eco::Data::Locations::NodeDiff::NodesDiff::DiffsTree`: supporting class. - **consistency** (snake vs camel case) on `parentd` for `Eco::Data::Locations::NodeLevel` - `Eco::API::UseCases::GraphQL::Utils::Sftp` - Configurable `remote_folder` - Made **native** location diffs staged command builders - These helpers target ONLY location nodes where the `id` are **codes** - Please notice that composed `id` (i.e. `name - code`) is NOT supported (as there isn't a clean way to update => no batch remap location ids operation available) - **Added** class and namespaces under `Eco::API::UseCases::GraphQL::Helpers::Location::Command` - `Diff` - `Diffs` - **SFTP Helpers** review - `Eco::API::Common::Session::SFTP#upload` added method - `Eco::API::UseCases::GraphQL::Utils::SFTP` - `#sftp_download_files` added method - `#local_folder` for downloading the files - added parameters to the existing methods ### Changed - **Parsers** - Native **date parser**, added _warning_ when date cannot be parsed - Migrated **select parser** (`Eco::API::Common::People::DefaultParsers::SelectParser`). This change entailed to introduce several changes: - Added _warning_ when select option is unknown. - `Eco::API::Common::People::PersonParser`: 1. methods `#parse` and `#serialize` call to the parser/serializer method by using a block to resolve `Proc` call dependencies. 2. **added** method `#select_tables` (this has been moved from the _default parsers_ class to the _person parser_ itself) - `Eco::Language::Models::ParserSerializer` - methods `#parse` and `#serialize` can be called with a `block` to resolve dependencies. - `Eco::CSV::Table` the internal method `to_rows_array` was not spliting `Array` values with pipe operator `|`. Made so it does so. - **Note** that `to_array_of_hashes` (the opposite method) does NOT convert them back to `Array` (but it wasn't converting back the array string to its Array version anyway) - **renamed** use case `-export-tree` to `-tagtree-extract` - `Eco::API::UseCases::Default::Locations::TagtreeExtract` - **Improved** `Eco::Data::Locations::NodeLevel` by adding support for `classifications` and `classification_names` - It just catches the **original header** names, and uses them - **Note** that these headers may NOT be actual classifications, but just conventional header names. For this reason, it is **required** that there is a **parse** function that **validates** that they are **actual classifications** - `Eco::API::Organization::TagTree` - **changed** `as_json` serialization on **classifications** (it serializes to a `dup` of the `Array` now) - ceased to ~~`join('|')`~~ - **changed** `as_json`. It now includes `level` (`depth + 1`) - **Optimized** life cycle of applying commands to _locations structures_ - This optimization is based on **NOT retrieving** the full locations structure on each request (_apply commands payload block_ on **graphql**). This also entails that the number of **backups** per run is drastically minimized. - `Eco::API::UseCases::GraphQL::Helpers::Location::Command::DSL` - **Added** `#batch_tree_track_mode` to define what tracking mode would be used at each commands stage. - The only stage that tracks/backes-up the tree on each request is now `:id` (or `:id_name`) -> remap location ids _integrity check_ purposes (which is actually somehow redundant; just an additional measure in place). - `Eco::API::UseCases::GraphQL::Helpers::Location::Command` - `#sliced_batches` - **added** parameter `track_tree_mode:` - **before** final call to `apply_commands`, it scopes the payload `block` of the request (using the new custom method `scope_commands_block`, see below) - Decoupled re-configurable (**overridable**) methods into `Optimizations` sub-space: `Eco::API::UseCases::GraphQL::Helpers::Location::Command::Optimizations` - `#default_tree_tracking_mode` the fallback tracking mode (besides `#batch_tree_track_mode` on `DLS`) - `#scope_commands_block` based on the current tree tracking mode, it scopes what the block for the apply commands payload will be - `#commands_payload_without_structure_block`: sample graphql payload block that does NOT retrieve the locations structure (**optimization lies here**) - `Eco::API::UseCases::GraphQL::Samples::Location::Command::Results` - **Decoupled** tracking of changed ids into `Eco::API::UseCases::GraphQL::Samples::Location::Command::TrackChangedIds` - `#update_tags_remap_table` -> remove `:move` stage tracking - As content only has the lowest level location node, moving does **NOT** entail remapping locations any longer (there isn't full path on content at this stage; after `RS P3` release) - `Eco::Data::Locations::NodeDiff` - `archived?` added parameter for **validation** (default `true`) - `attr_expose` - It adds `_prev` as a postfix (**removed** as a prefix ~~`prev_`~~) - It uses the question mark `?` alone (**removed** ~~`diff_`~~ prefix) - **added** all these methods support now `snake_case` - **BREAKING** change to move onto **RS P3 post-release** - A change of `name?` **WON'T** trigger a change of `id` (`nodeId`) any more - For this reason, identification on changes on the `id` will be besides changes of the `name` - `Eco::Data::Locations::NodeDiff::NodesDiff`- **Important change** on `#diffs` (core property) - It now discards diffs that `insert?` and `archive?` as well, provided that they do not generate updates - **Note** that this limiation may be a drawback when we aim to import historical location nodes that should be in the org (for import purposes) but that are not active locations. The way **around it** is to just use an input where the `archived` property is `false` (later on launch those again with `archived` true, but lets do a good input data integrity check here) - `Eco::Data::Hashes::DiffResult` - moved `Meta` under its namespace - created _private_ unique points to access source hashes. This will allows to extend the behaviour from child classes - **Moved** hash accessors (**DSL**) to `Eco::Data::Hashes::DiffResult::Meta` - also **added** method `key_present?` - **improved** `slice_attrs` to return `nil` if `src` isn't present. - **added** `Array` comparizon via `eq?` method. - (Class) **Added** named arg `when_present` to `compare` class method. - (Instance) **Removed** unused method `compared_attrs` - **Replaced by** `all_compared_attrs` - (Class) **Added** `compared_attrs_when_present` - (Instance) **Added** `comparable_attr?`, which based on `all_compared_attrs` (instance method) checks if `attr` is required for presence on both source hashes (`src_1` and `src_2`) - This is supported by the **new** method `key_present_in_both?` - (Instance) **Modified** behaviour on `diff_attrs` provided that takes into consideration if an `attr` is **comparable** (`comparable_attr?`) - upgrade **gems** `ecoportal-api-v2` and `ecoportal-api-graphql` - this brings some optimizations when treeifying locations structures - `Eco::Data::Hashes::ArrayDiff` - **Removed** unused method `compared_attrs` ### Fixed - upgrade `ecoportal-api-v2` **gem** - A bunch of small things on the `Eco::Data::Locations` namespace - `Eco::API::Session::Config#live_trees` to choose a tree when only one - `Eco::API::UseCases::GraphQL::Helpers::Location::Base` - `tagtree_id` method should `map` values rather than `select` keys on `options` - `Eco::Data::Locations::NodeDiff::NodesDiff` - fix `diffs_summary` lining - `Eco::Language::Methods::DslAble` - explicit behaviour for `respond_to_missing?` (dsl doesn't need to allow method capturing via `method` call) - add `__FILE__` and `__LINE__` to error backtrace on `eval` - Parsing `archived` value in - `Eco::API::Organization::TagTree` - `Eco::Data::Locations::NodePlain` ## [2.6.4] - 2024-03-06 ### Changed - updated core **gem** `ecoportal-api` - The `subordinates` core people property has been removed from the back-end - This was due to some performance issues with org hierarchy model. - As a consequence a temporary patch has been added temporarily in the current gem. ### Fixed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - initialize `@total_search_results` ## [2.6.3] - 2024-02-29 ### Changed - upgrade `ecoportal-api-v2` **gem** ### Fixed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - `dry_run_feedback` fixed typo ## [2.6.2] - 2024-02-23 ### Added - `Eco::API::Session::Config::TagTree`: added **benchmarks** to locations structure live retrieval - To all **Ooze** cases that use register update - `Eco::API::UseCases::OozeSamples::Helpers::Creatable` native helpers - to draft entries - `Eco::API::UseCases::OozeSamples::RegisterMigrationCase` -> removed code double-up due to this addition to the register update case. - `Eco::API::Common::Loaders::Base` added **methods** - `#simulate?` and `#dry_run?` - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - added **kpis** attempted updates and attempted creations ### Changed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - `#main` allows to tell it to just `yield` ### Fixed - `Eco::Data::Locations::NodeDiff::Selectors` `any?` (typo) - `Eco::API::UseCases::OozeSamples::TargetOozesUpdateCase` - fixed **kpis** tracking ## [2.6.1] - 2024-02-11 ### Added - For use case `Eco::API::UseCases::Default::Locations::TagtreeExtract` - New `-indent` option - `Eco::API::UseCases::UseCase` - Defines on loader object attr reader methods `people`, `input` and `usecase` unless they already exist. - Some class / method helpers - `Eco::Language::Methods::DelegateMissing` to redirect missing methods to one object - `Eco::Language::Methods::DslAble` to allow direct method calls on blocks - `Eco::Language::Klass:WhenInherited` to allow to defined a block that gets called when the class is inherited - **DSL** capabilities (for block calls) for - `Eco::API::Session::Batch::BasePolicy` - `Eco::API::Session::Batch::Job` - `api_excluded` block to be called in the Job's context - `Eco::API::UseCases::BaseIO` - This shortens code lines in workflow blocks - `Eco::API::Session::Config::Workflow#run` has been adapted to boost the evalution of the workflow blocks within the context of the `BaseIO` that is carried throughout all the run process. - **NEW** Loaders - `Eco::API::Custom::Config` (**DSL** alike) allows to open up configuration via class - Redirects to `Eco::API::Common::Loaders::Config` - Re-usable sample child classes can created with the use of `config_block`, which in combination with `when_inherited` will load the basic config to custom config classes. - `Eco::API::Custom::Workflow` (**DSL** alike) allows to open up workflow configurations via class - Redirects to `Eco::API::Common::Loaders::Config::Workflow` - `Eco::API::Custom::Mailer` (first **sample**) allows to just define some constants to modify the generic behaviour of this sample class you will want to inherit to enable mailing workflow. - Redirects to `Eco::API::Common::Loaders::Config::Workflow::Mailer` - `Eco::Assets#cli` able to yield the `cli` to a block - `Eco::API::UseCases::BaseIO#process_case` - **added method** `process_case`, which allows to pass the `io` itself as a paramter. - When this is used, the `output` swap as `input` / `people` is performed (before and after). ### Changed - **IMPORTANT** overriden `Object#inspect` to `to_s` to prevent recursive deep introspection of object internals on `MethodError` - `Eco::API::Common::Loaders::CaseBase` - **removed** attr `usecase` - `Eco::API::UseCases::BaseIO` - `output` can be set on initialization - `#new` carries the `output` as well. - `Eco::API::Session::Config::Workflow` - `#run` - workflow blocks don't require to explicitly return the `BaseIO` when there isn't any to return. It will just keep the `io` as it was before the call. - also made it so the returned io is **always** an **instance of** `Eco::API::UseCases::BaseIO` (so it won't return an instance of a child class). This change can be considered a fix. **Aside note:** only possible now that `output` is carried on through objects of type (so there's there's no data loss in the calls chain) `Eco::API::UseCases::BaseIO` (i.e. `io.new`) - `#for` - **now** it only requires a `block` if no `key` is provided - `Eco::Data::Locations::NodeBase::TagValidations` - made module re-usable, by removing dependency on `clean_id` method. - Improved the **patch** on exception that adds method `#patch_full_message` - Parameter `trace_count` added (`default: -1` for full trace) ### Fixed - `Eco::Data::Locations::NodeBase::Treeify` - **bug** on strings and interpolation when building the warning/error messages - **added** detection and _warnings_ for **unlinked parents**: as `get_children` is called from the top via `nil` (those that are top level nodes), and all the call chain to collect children goes through their `parent_id` relationship. - If the input nodes had some where there's no direct link between `nil` and a node `id` that is a `parent_id`, `parents[node.id]` would never be called. Meaning that in an input with a list of nodes, there could be clusters of subtrees that do not add/link to the top level (`nil`). - It now gathers those separated subtrees in an `Array` parameter called `unlinked_trees` - `Eco::API::Session::Config::Workflow` - Returning an `Eco::API::UseCases::BaseIO` from callbacks `before`, `after` and `run` would raise an `ArgumentError`. - **Now** the original `io` is returned otherwise the returned value is a `BaseIO` - `Eco::API::Session::Config::Workflow` - **changed** `open` to alias method for `with` (open was clashing) - `Eco::API::UseCases::GraphQL::Helpers::Location::Base` - **removed** `enviro` param for org tagtree built - `Eco::API::UseCases::Cli::DSL` - `::callback` was not acting like a DSL method, which would just return `nil` always (lost `block`) - CLI arguments are unique. If a Cli class has already been run, no need to re-run it. Cli class re-usability is still not in the pipeline, and therefore, it must be run only once. - `Eco::Data::Locations::NodePlain` - `serializer` referred to an non existing constant. - **IMPORTANT** `parent_id` should be `cleaned` as well. Otherwise parents with an id cleanage don't match their children's `parent_id` - `Eco::API::Common::ClassHelpers` - `::inerited` method must call `super` to be able to chain other calls - `Eco::API::Common::Session::Mailer` - The logging message was not printing who the email was sent to. ## [2.6.0] - 2024-02-03 ### Added - New use case to `-export-tree` (**tagtree extract**) - `Eco::API::UseCases::Default::Locations::TagtreeExtract` - `Eco::API::UseCases::UseCase` - added `#classed_definition` to expose the original class definition - injected further parameter as instance variables to the original class definition on run-time. - Expose `live_trees` retrieval: - `Eco::API::Session#live_trees` - `Eco::API::Session::Config#live_trees` - Ability to CLI-integrate use cases and their options via class - `Eco::API::UseCases::Cli` - Added use case to extract live locations structure (`-export-tree`) - `Eco::API::UseCases::GraphQL::Cases::TagtreeExtract` - `#api?` method to check if an API version is available - `Eco::API::Common::Session::Environment#api?` - `Eco::API::Common::Session::BaseSession#api?` - `Eco::API::Organization::TagTree#merge` the merge method for tagtrees - It allows to have all structure nodes available to check if a tag belongs to them - `Eco::API::Session::Config::Workflow` - **added** `open` alias method for `for` - `Eco::Data::Mapper#self_mapped?` to check if a value maps to itself ### Changed - upgrade `ecoportal-api-graphql`, `ecoportal-api-v2` and `ecoportal-api` - `Eco::API::Session#tagtree`: added parameters to be able to obtain: - `:live` live trees if graphql api is available on the enviro - `:merge` to merge all live trees if there isn't just one - Tagtree retrieval: remove `enviro` param where there's no caching - Removed also from `Eco::API::Organization::TagTree::new` - Removed some use cases: - `Eco::API::UseCases::DefaultCases::AbstractPolicyGroupAbilities` - `Eco::API::UseCases::DefaultCases::AppendUsergroupsCase` - `Eco::API::UseCases::DefaultCases::CreateDetailsCase` - `Eco::API::UseCases::DefaultCases::CreateDetailsWithSupervisorCase` - `Eco::API::UseCases::DefaultCases::EmailAsIdCase` - `Eco::API::UseCases::DefaultCases::NewIdCase` - `Eco::API::UseCases::DefaultCases::RemoveAccountSyncCase` - `Eco::API::UseCases::DefaultCases::RemoveAccountTransCase` - `Eco::API::UseCases::DefaultCases::NewEmailCase` - `Eco::API::UseCases::DefaultCases::SetSupervisorCase` - `Eco::API::UseCases::DefaultCases::TagTree` - `Eco::API::UseCases::DefaultCases::UpdateDetailsCase` - `Eco::API::UseCases::DefaultCases::ResetLandingPageCase` - Moved some default use cases to new namespace `Eco::API::UseCases::Default` ### Fixed - Compatibility with `ruby 3` - replaced `Proc.new` (with no block) by `block` in methods - replaced `File#exists?` by `File#exist?` - call to method's `super` not specifying args, no longer passes keyed/named args via simple splat `*` (but only double splat `**`) - limit `nokogiri` gem to prev `1.16` (as it requires ruby 3 from thereon) - `Eco::API::Common::People::PersonEntryAttributeMapper` - `#aliased_attrs` was missing internal attrs that have been mapped directly as external attrs (same ext attr name as int attr name) ## [2.5.10] - 2023-11-22 ### Fixed - `Eco::API::UseCases::DefaultCases::ReinviteSyncCase` remove unnecessary additional parameters on call. - `Eco::API::Session::Config::SFTP#enviro_subpaths` provided that a current workaround can be skipped ## [2.5.9] - 2023-09-05 The input **csv** of trees could come very compacted, which had unintended consequences. - This is a fix to this scenario. ### Added - `Eco::Data::Locations::NodeLevel#raw_latest_consecutive_top_empty_level` - To scope the missing ancestors (up to what level) - `Eco::API::UseCases::DefaultCases::Samples::Sftp` - Options for `remote_subfolder`, `remote_target_folder` and `remote_folder` - `Eco::API::Organization::People#updated_or_created` **method** - Scoping all people that have been updated as part of the current session. - Note that it includes also those that are hris excluded. - **Improvement** on `Eco::API::Common::Loaders::Base` - Should be able to call `log(:level) { "Some message" }` ### Changed - `Eco::Data::Locations::NodeLevel` - **removed** `#merge!` and `#override_upper_levels` - `#override_lower_levels` **renamed** to `#update_lower_levels` - `Eco::API::UseCases::DefaultCases::CsvToTree` use case - Moved to work with `Eco::Data::Locations::DSL` - **Removed** helpers double-ups. - Default workflow `on(:report)`: implementation of `-processed-people-to-csv` - It now only includes people created or updated as part of the current session. - **Improvement**: `Eco::API::Common::Loaders::Parser` made `serializer` method **not required** - This aims to use the default serializer definition - Made **inheritable** `parsing_phase` and `serializing_phase` ### Fixed - `Eco::Data::Locations::NodeLevel#update_lower_levels` - To use `#raw_latest_consecutive_top_empty_level` - Compact from first filled in `tags_array` onwards (preserve empty tags at the beginning for clean validation) - `Eco::Data::Locations::NodeLevel::Cleaner` - `#tidy_nodes` **gap** calculation is scoped against previous node (common ancestors) - `#fill_in_parents` to give feedback on unexpected parental relationship - `Eco::API::UseCases::DefaultCases::Samples::Sftp` - Prevent double slashed paths ## [2.5.8] - 2023-08-28 ### Changed - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - Deafult prompt should be `Yes` on **remote** ## [2.5.7] - 2023-08-15 ### Added - `Eco::API::Session::Config#tagtree_id=` allows to define a target structure id - This is for `live` retrieval of tagtree on people sync processes - It only makes sense if graphql credentials are configured ## [2.5.6] - 2023-08-14 ### Changed - `Eco::API::Session::Config::Tagtree#live_tree` remove memmoize tree: it now always trigger a query to the back-end - Better messaging to know what's going on. ### Fixed - `Eco::API::Session#live_tree` was not forwarding target structure id `id` - `Eco::Data::Locations::NodeLevel#override_lower_levels` - By **default** should only override empty upper levels - `Eco::Data::Locations::NodeLevel::Cleaner` - `#tidy_nodes` when **gap** (merged parent) identified, `level` is still correct - `Eco::Data::Locations::NodeLevel` - `#nodes_from_csv` correctly identify parent with big gaps - This fix ensures a correct normalization - `Eco::API::UseCases::GraphQL::Samples::Location::Command::Result` - **Batch remap tags** _built_ requires full path to keep from-filter specificity - This change also wraps into a new class the remap tags table. ## [2.5.5] - 2023-08-03 ### Added - `Eco::API::Organization::TagTree` - **added/improved methods** - `#as_json` new parameter `max_depth:` to be able to cut the tree - `#active_tree` new method to exclude archived nodes. - `#truncate` new method to obtain a tree cut to `max_depth:` - `Eco::API::Session::Config::Tagtree`: **exposed** `include_archived:` (a.k.a. `inludeArchivedNodes`). - This change states that `session.tagtree` does not retrieve archived nodes by default, while `session.live_tree` does retrieve archived nodes. - This change required an update on the `ecoportal-api-graphql` **gem** ### Fixed - `Eco::API::Organization::TagTree#path` - dups the result (rather than exposing the internal path array) ## [2.5.4] - 2023-07-27 ### Added - SFTP case helpers: `Eco::API::UseCases::GraphQL::Utils::Sftp` - `Eco::Data::Locations::NodeDiff` and `Eco::Data::Locations::NodeDiff::NodeDiffs` - Aim to identify changes in the locations structure ### Changed - Some internal tidy up in `Eco::API::UseCases::GraphQL` ## [2.5.3] - 2023-07-19 ### Added - _GraphQL base case_ for **locations structure update**. - Refer to `Eco::API::UseCases::GraphQL::Samples::LocationCommands` - See also `Eco::API::UseCases::GraphQL`. **Added** `Helpers` and `Samples` - `Eco::Data::Locations` helpers - **Converters**: it offers a `DSL` (see `Eco::Data::Locations::DSL`) manage as input/output: 1. CSV files with locations in two basic formats (list of nodes and hierarchy of locations) 2. This comes with integrity checkers to ensure the input data files are correct (warnings) 3. It also allows to convert to/from an organization locations structure and csv files. - Making generic the helpers of `Eco::API::UseCases::DefaultCases::CsvToTree` - The prospect is to move to the new/reviewed helpers at some stage (so remove the old helpers) - This comes with a series of **converters** and **parsers** to allow two basic forms of input/output: - CSV with list of nodes (`id`, `name`, `parent_id`) - CSV of the actual tree (each column is one level of the tree) - `Eco::API::Organization::TagTree` - **added/improved methods** - **added** shortcuts: `parent_id`, `parent_name` - **added** filters: `select`, `reject` - **improved** `as_json`: 1. new parameter `include_children` 2. Hash keys | Header names to `HEADER` column - **added** `as_nodes_json` to obtain a plain list (rather than hierarchical `as_json`) - `Eco::CSV::Table` - **added** `#add_index_column` to numerate the rows in a new column - **improved** `#add_column` with new parameter `pos` - **added** `#nil_blank_cells` and `#nil_blank_cells!` - `Eco::Language::BasicLogger` brief extensible logger. ### Changed - Refactored `Eco::API::Session::Logger` inheriting from `Eco::Language::BasicLogger` ### Fixed - Live tree retrieval. Allow to specify locations structure `id`, `kargs` & `block`. - `Eco::API::Session#live_tree` allow `id`, `kargs` & `block`, **fix** pass `include_archived` - `Eco::API::Session::Config#live_tree` allow `id`, `kargs` & `block` - When `id` is given, it uses `tagtree_config#live_tree_get` - **fixed** neither `kargs` nor `include_archived` where defined - `Eco::API::Session::Config::Tagtree` methods - `#live_trees` allow `kargs` - `#live_tree_get` **added**: it does not memoize - `#live_tree` allow `id` and `kargs` - **fixed** `include_archived` nodes should not be redirected to `live_trees` as in the latter this parameter has a different meaning (it refers to archived structures). - **Important note**: the `ecoportal-api-graphql` gem, at the moment always retrieves archived nodes. This makes the `include_archived` argument non-functional. However, at some stage this will be changed and everything should be sorted out by then. ## [2.5.2] - 2023-06-23 ### Added - `Eco::API::Session::Config::Workflow#exit_handle` - Allows to define a callback on `SystemExit` (`exit` call). ### Fixed - `Eco::API::Session::Config::Workflow` on `SystemExit` preserve original exit `status` value (i.e. `0`, `1`) - It was changing an `exit 1` to be an `exit 0` - Default Workflow. `exit 0` when no operation specified (rather than `exit 1`). ## [2.5.1] - 2023-06-06 ### Added - `Eco::API::Common::Session:SFTP#host` method - New options to control csv headers check (`Eco::API::Common::People::DefaultParsers::CSVParser`) - `Eco::API::Common::Loaders::CaseBase` add to the setter the `@usecase` - Implemented via `Eco::API::UseCases::UseCase` ### Changed - Dry out dependency loading. - `ecoportal-api` **gem** remains as eager loading. - Patch `Ecoportal::API::V1::Person` with `include` - Upgraded `ecoportal-api-graphql` **gem** - `Eco::API::Common::People::PersonEntryAttributeMapper` - Switched reversed attr defs warning to `info` logging level. - `Eco::API::Common::DefaultParsers::SelectParser` - When there is dependency with the hash of options, it should return nil when the option is unknown. ### Fixed - Tidied up file encoding when getting content. - This fixes `Eco::CSV::read` - `Eco::API::Common::People::DefaultParsers::CSVParser` made some refactor. ## [2.4.9] - 2023-04-17 ### Added - `Eco::API::UseCases#source_object` to retrieve the original use case definition object - This allows the `Eco::API::UseCases::UseCase` object to access the object that defined the usecase and initialize `@session`. - It now can know what `type` of use case created the `@callback` - Next steps with this may be play a bit with the `aritity` of the `@callback` block, allow parsers to skip the serializer definition (so the default one runs), etc. - `Eco::API::Common::Loaders::Base` the above feature allowed to initialize the `@options`, and therefore... - `#options` method **added** (based on `@options` instance var) ### Changed - `Eco::API::Common::Loaders::Base` - `#session` method is based on `@session` instance var, which allows to override without having to redefine `session` (`attr_reader :session` is no longer necessary) - Softened max version of **gem** dependencies - Upgraded self-managed **gem** dependencies ### Fixed - `Eco::API::Common::ClassAutoLoader::autoload_children` - Skip `singleton_classes` ## [2.4.8] - 2023-04-03 ### Added - `Eco::API::Organization::TagTree#ancestors` returns the ancestor nodes. ## [2.4.7] - 2023-04-03 ### Added - `Eco::Data::Hashes::ArrayDiff#diffs?` - `Eco::API::Organization::TagTree` added methods: - `#source` => to expose the original doc - `#all_nodes` => to implement the block call ### Changed - Upgraded `ecoportal-api-graphql` **gem** ### Fixed - `Eco::API::Session::Config::Api` **new `graphql` api** was missing `host` - `Eco::API::UseCases::DefaultCases::CsvToTree::Helper` - `#nodes_from_csv` assumed unique top level tag and not present - This fix completes this feature (as top level tags were not there) ## [2.4.6] - 2023-04-02 ### Added - `Eco::API::Organization::TagTree` added support for `archived_token` - Added support for `block` in - `Eco::API::Session#live_tree` - `Eco::API::Session::Config::Tagtree` in `#live_trees` and `live_tree` ### Changed - Upgraded `ecoportal-api-graphql` **gem** ## [2.4.5] - 2023-03-31 ### Added - `Eco::API::Organization::TagTree` support for `archived` and `weight` properties - `Eco::Data::Hashes::ArrayDiff` and `Eco::Data::Hashes::DiffResult` - Enable easy comparison of array of hashes - Input data can be diverse ### Fixed - `Eco::API::UseCases::DefaultCases::CsvToTree` - Fixed the missed alignment children that jump levels - `Eco::API::UseCases::DefaultCases::CsvToTree::Node` - `to_h`: attrs param was being ingnored. ## [2.4.4] - 2023-03-29 ### Added - `Eco::API:Organization::TagTree` - Added **methods** `#each` and `#all_nodes` allow to loop through all nodes - Added `parent` to refer to the parent node. ### Changed - `Eco::API:Organization::TagTree` made **Enumerable** ### Fixed - `Eco:API::Session#live_tree` pass `enviro` - `Eco::API::UseCases::OozeSamples::RegisterUpdateCase` - Fix typo on error message. ## [2.4.3] - 2023-03-23 ### Fixed - `Eco::API::MicroCases#take_email_from_account` it was failing at the very (when restoring the original account) - Comes from back-end issue. Adding account with preferences.kiosk_enabled would return: - `{"errors"=>["account > preferences > kiosk_enabled is an unknown field"]}` ## [2.4.2] - 2023-03-17 ### Fixed - `Eco::API::Common::People::EntryFactory#entries` _bom_ **encoding** (get back support) ## [2.3.3] - 2023-03-16 ### Added - Added new option `-input-encoding` to specify the encoding of an input file ### Changed - `ecoportal-api` **gem** update ## [2.3.2] - 2023-03-10 ### Fixed - upgraded core library gems: - `ecoportal-api` ## [2.3.1] - 2023-03-09 ### Changed - upgraded core library gems: - `ecoportal-api` - `ecoportal-api-v2` - `ecoportal-api-graphql` ## [2.2.5] - 2023-03-07 ### Fixed - Make it, so it requires to have a locations structure with nodes (raise exception otherwise) ## [2.2.4] - 2023-03-07 ### Fixed - Logger object when logging from config ## [2.2.3] - 2023-03-07 ### Added - Logger info for live tree selected. ### Changed - `Eco::API::Common::People::DefaultParsers::PolicyGroupsParser` - Should warn of unknown policy groups ### Fixed - `Eco::API:Organization::TagTree` fix `defaults_tag` scoping ## [2.2.2] - 2023-02-27 ### Fixed - Typo in GraphQL client (`locationsStructures` should read `locationStructures`) - Multiple typos in new code ## [2.2.1] - 2023-02-24 ### Added - `Ecoportal::API::V1::Person#contractor_organization_id` - **Support** for **Reporting Structures** (breaking change) - `Eco::API::UseCases::DefaultCases::CsvToTree` use case to generate tree json out of a csv - The output file can be fed to `Eco::API::Organization::TagTree` ### Changed - **Patch** `Ecoportal::API::V1::Person::VALID_TAG_REGEX` it now allows for dot `.` - update gem dependencies ## [2.1.12] - 2022-11-30 ### Fixed - `Eco::API::Session::Batch::Errors#str` remove double up on error message - wrong require ## [2.1.11] - 2022-11-30 ### Changed - Bring the `-set-supervisor` native case up to date - `Eco::API::Session::Batch::Errors#errors` - better error catching and description ## [2.1.10] - 2022-11-30 ### Fixed - `Eco::API::Session::Batch::Errors#errors` - include errors with no `error` property in body (i.e. `!response.success?`) ## [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: ## [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.