Change Log
All notable changes to this project will be documented in this file.
[2.7.16] - 2024-06-18
Added
Changed
Fixed
RegisterUpdateCase
filters
[2.7.15] - 2024-06-18
Added
Changed
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
- See
[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
- See
[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.
- default prompt to user to
[2.7.6] - 2024-05-16
Changed
- upgraded
ecoportal-api-graphql
gem, andecoportal-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 anArray
[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
prioritizesession.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 insession
,session.config
and inconfig.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:
- Only backing up the tree once (before)
- 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:
Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeToList
Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeDiff
Eco::API::UseCases::GraphQL::Samples::Location::Command::Service::TreeUpdate
snake_case
helper (atEco::Data::Strings::SnakeCase
)camel_case
helper (atEco::Data::Strings::CamelCase
)camel_case
helper (atEco::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 helperEco::Data::Locations::NodeDiff::NodesDiff::DiffsTree
: supporting class.
- consistency (snake vs camel case) on
parentd
forEco::Data::Locations::NodeLevel
Eco::API::UseCases::GraphQL::Utils::Sftp
- Configurable
remote_folder
- Configurable
- 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
- These helpers target ONLY location nodes where the
- SFTP Helpers review
Eco::API::Common::Session::SFTP#upload
added methodEco::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
:- methods
#parse
and#serialize
call to the parser/serializer method by using a block to resolveProc
call dependencies. - added method
#select_tables
(this has been moved from the default parsers class to the person parser itself)
- methods
Eco::Language::Models::ParserSerializer
- methods
#parse
and#serialize
can be called with ablock
to resolve dependencies.
- methods
Eco::CSV::Table
the internal methodto_rows_array
was not splitingArray
values with pipe operator|
. Made so it does so.- Note that
to_array_of_hashes
(the opposite method) does NOT convert them back toArray
(but it wasn't converting back the array string to its Array version anyway)
- Note that
- renamed use case
-export-tree
to-tagtree-extract
Eco::API::UseCases::Default::Locations::TagtreeExtract
- Improved
Eco::Data::Locations::NodeLevel
by adding support forclassifications
andclassification_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 adup
of theArray
now) - ceased to ~~join('|')
~~ - changed
as_json
. It now includeslevel
(depth + 1
)
- changed
- 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).
- The only stage that tracks/backes-up the tree on each request is now
Eco::API::UseCases::GraphQL::Helpers::Location::Command
#sliced_batches
- added parameter
track_tree_mode:
- before final call to
apply_commands
, it scopes the payloadblock
of the request (using the new custom methodscope_commands_block
, see below)
- added parameter
- 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
onDLS
)#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)
- Decoupled tracking of changed ids into
Eco::Data::Locations::NodeDiff
archived?
added parameter for validation (defaulttrue
)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 ofid
(nodeId
) any more - For this reason, identification on changes on the
id
will be besides changes of thename
Eco::Data::Locations::NodeDiff::NodesDiff
- Important change on#diffs
(core property)- It now discards diffs that
insert?
andarchive?
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 isfalse
(later on launch those again witharchived
true, but lets do a good input data integrity check here)
- It now discards diffs that
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 returnnil
ifsrc
isn't present. - added
Array
comparizon viaeq?
method. - (Class) Added named arg
when_present
tocompare
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 onall_compared_attrs
(instance method) checks ifattr
is required for presence on both source hashes (src_1
andsrc_2
)- This is supported by the new method
key_present_in_both?
- This is supported by the new method
- (Instance) Modified behaviour on
diff_attrs
provided that takes into consideration if anattr
is comparable (comparable_attr?
)
- moved
- upgrade gems
ecoportal-api-v2
andecoportal-api-graphql
- this brings some optimizations when treeifying locations structures
Eco::Data::Hashes::ArrayDiff
- Removed unused method
compared_attrs
- Removed unused method
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 oneEco::API::UseCases::GraphQL::Helpers::Location::Base
tagtree_id
method shouldmap
values rather thanselect
keys onoptions
Eco::Data::Locations::NodeDiff::NodesDiff
- fix
diffs_summary
lining
- fix
Eco::Language::Methods::DslAble
- explicit behaviour for
respond_to_missing?
(dsl doesn't need to allow method capturing viamethod
call) - add
__FILE__
and__LINE__
to error backtrace oneval
- explicit behaviour for
- Parsing
archived
value inEco::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
- initialize
[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 justyield
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
- New
Eco::API::UseCases::UseCase
- Defines on loader object attr reader methods
people
,input
andusecase
unless they already exist.
- Defines on loader object attr reader methods
- Some class / method helpers
Eco::Language::Methods::DelegateMissing
to redirect missing methods to one objectEco::Language::Methods::DslAble
to allow direct method calls on blocksEco::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 contextEco::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 theBaseIO
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 withwhen_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 thecli
to a blockEco::API::UseCases::BaseIO#process_case
- added method
process_case
, which allows to pass theio
itself as a paramter. - When this is used, the
output
swap asinput
/people
is performed (before and after).
- added method
Changed
- IMPORTANT overriden
Object#inspect
toto_s
to prevent recursive deep introspection of object internals onMethodError
Eco::API::Common::Loaders::CaseBase
- removed attr
usecase
- removed attr
Eco::API::UseCases::BaseIO
output
can be set on initialization#new
carries theoutput
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 theio
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 thatoutput
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 nokey
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)
- Parameter
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 vianil
(those that are top level nodes), and all the call chain to collect children goes through theirparent_id
relationship. - If the input nodes had some where there's no direct link between
nil
and a nodeid
that is aparent_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 calledunlinked_trees
Eco::API::Session::Config::Workflow
- Returning an
Eco::API::UseCases::BaseIO
from callbacksbefore
,after
andrun
would raise anArgumentError
. - Now the original
io
is returned otherwise the returned value is aBaseIO
- Returning an
Eco::API::Session::Config::Workflow
- changed
open
to alias method forwith
(open was clashing)
- changed
Eco::API::UseCases::GraphQL::Helpers::Location::Base
- removed
enviro
param for org tagtree built
- removed
Eco::API::UseCases::Cli::DSL
::callback
was not acting like a DSL method, which would just returnnil
always (lostblock
)- 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 becleaned
as well. Otherwise parents with an id cleanage don't match their children'sparent_id
Eco::API::Common::ClassHelpers
::inerited
method must callsuper
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.
- added
- 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 availableEco::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 forfor
- added
Eco::Data::Mapper#self_mapped?
to check if a value maps to itself
Changed
- upgrade
ecoportal-api-graphql
,ecoportal-api-v2
andecoportal-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 also from
- 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) byblock
in methods - replaced
File#exists?
byFile#exist?
- call to method's
super
not specifying args, no longer passes keyed/named args via simple splat*
(but only double splat**
)
- replaced
- limit
nokogiri
gem to prev1.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
andremote_folder
- Options for
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" }
- Should be able to call
Changed
Eco::Data::Locations::NodeLevel
- removed
#merge!
and#override_upper_levels
#override_lower_levels
renamed to#update_lower_levels
- removed
Eco::API::UseCases::DefaultCases::CsvToTree
use case- Moved to work with
Eco::Data::Locations::DSL
- Removed helpers double-ups.
- Moved to work with
- 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
madeserializer
method not required- This aims to use the default serializer definition
- Made inheritable
parsing_phase
andserializing_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)
- To use
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
- Deafult prompt should be
[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
- This is for
[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 idid
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 parametermax_depth:
to be able to cut the tree#active_tree
new method to exclude archived nodes.#truncate
new method to obtain a tree cut tomax_depth:
Eco::API::Session::Config::Tagtree
: exposedinclude_archived:
(a.k.a.inludeArchivedNodes
).- This change states that
session.tagtree
does not retrieve archived nodes by default, whilesession.live_tree
does retrieve archived nodes. - This change required an update on the
ecoportal-api-graphql
gem
- This change states that
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
andEco::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
. AddedHelpers
andSamples
- Refer to
Eco::Data::Locations
helpers- Converters: it offers a
DSL
(seeEco::Data::Locations::DSL
) manage as input/output: - CSV files with locations in two basic formats (list of nodes and hierarchy of locations)
- This comes with integrity checkers to ensure the input data files are correct (warnings)
- 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)
- Converters: it offers a
Eco::API::Organization::TagTree
- added/improved methods- added shortcuts:
parent_id
,parent_name
- added filters:
select
,reject
- improved
as_json
: - new parameter
include_children
- Hash keys | Header names to
HEADER
column - added
as_nodes_json
to obtain a plain list (rather than hierarchicalas_json
)
- added shortcuts:
Eco::CSV::Table
- added
#add_index_column
to numerate the rows in a new column - improved
#add_column
with new parameterpos
- added
#nil_blank_cells
and#nil_blank_cells!
- added
Eco::Language::BasicLogger
brief extensible logger.
Changed
- Refactored
Eco::API::Session::Logger
inheriting fromEco::Language::BasicLogger
Fixed
- Live tree retrieval. Allow to specify locations structure
id
,kargs
&block
.Eco::API::Session#live_tree
allowid
,kargs
&block
, fix passinclude_archived
Eco::API::Session::Config#live_tree
allowid
,kargs
&block
- When
id
is given, it usestagtree_config#live_tree_get
- fixed neither
kargs
norinclude_archived
where defined Eco::API::Session::Config::Tagtree
methods#live_trees
allowkargs
#live_tree_get
added: it does not memoize#live_tree
allowid
andkargs
- fixed
include_archived
nodes should not be redirected tolive_trees
as in the latter this parameter has a different meaning (it refers to archived structures).
- fixed
- Important note: the
ecoportal-api-graphql
gem, at the moment always retrieves archived nodes. This makes theinclude_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).
- Allows to define a callback on
Fixed
Eco::API::Session::Config::Workflow
onSystemExit
preserve original exitstatus
value (i.e.0
,1
)- It was changing an
exit 1
to be anexit 0
- It was changing an
- Default Workflow.
exit 0
when no operation specified (rather thanexit 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
- Implemented via
Changed
- Dry out dependency loading.
ecoportal-api
gem remains as eager loading.
- Patch
Ecoportal::API::V1::Person
withinclude
- Upgraded
ecoportal-api-graphql
gem Eco::API::Common::People::PersonEntryAttributeMapper
- Switched reversed attr defs warning to
info
logging level.
- Switched reversed attr defs warning to
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
- This fixes
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.
- This allows the
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 redefinesession
(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
- Skip
[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
newgraphql
api was missinghost
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 forarchived_token
- Added support for
block
inEco::API::Session#live_tree
Eco::API::Session::Config::Tagtree
in#live_trees
andlive_tree
Changed
- Upgraded
ecoportal-api-graphql
gem
[2.4.5] - 2023-03-31
Added
Eco::API::Organization::TagTree
support forarchived
andweight
propertiesEco::Data::Hashes::ArrayDiff
andEco::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.
- Added methods
Changed
Eco::API:Organization::TagTree
made Enumerable
Fixed
Eco:API::Session#live_tree
passenviro
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
fixdefaults_tag
scoping
[2.2.2] - 2023-02-27
Fixed
- Typo in GraphQL client (
locationsStructures
should readlocationStructures
) - 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
- The output file can be fed to
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?
)
- include errors with no
[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)
- Ability to skip prefilter of entries with no
[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)
- When in
- 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
methodexcluded_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
- from
[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)
- Requires use of
Eco::API::UseCases::OozeSamples::RegisterUpdateCase
added methodwith_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 parameterscc
andbcc
[2.1.3] - 2022-10-11
Added
Eco::API::UseCases::OozeSamples::OozeBaseCase
with_fields
,with_sections
andadd_field
accept anentry
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
- Requires
Ecoportal::API::Session#live_tree
see above
Changed
Ecoportal::API::Session::Config#tagtree
to use#live_tree
if there isn't atagtree.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 useEco::API::Session::Config::Apis
, added#default_pass
and#default_email
to use theGraphQL
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
, theorg_id
is not a required parameter forAPIv2
[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 createGraphQL
use cases
Changed
Eco::CSV#read
andEco::CSV#parse
delegatingnil
row removal to sublcassEco::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 withheader
row (with0
count)
- to delete rows with all
[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 configEco::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
exposedhost
property skip-header-checks
option- It prevents checks done in the
Eco::API::Common::People::DefaultParsers::CSVParser
- It prevents checks done in the
- 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 version0.8.30
Fixed
-entries-to-csv
case; option-out
was not being usedEco::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 withentries-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 stagesstate
- It was not building the model
- Optimized
- It returns a
PageStage
(rather thanPage
), to ensure all supported properties are accessible (i.e.uid
)
- On prompt to launch, it answers
[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 excludefilter_tags
- when person is
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
- invokable with
Eco::API::Session::Config::People
addeddefault_login_method
helpers
Eco::API::Session::Config#default_login_method=
addedEco::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
- Added a couple of handy helpers:
Changed
Eco::API::Common::Session::SFTP#move
new parameteroverride:
(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 to0.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
- Added support for
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
oremail already taken
- Made it so the
[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
- Same as
Changed
ecoportal-api-v2
dependency upgradeEco::API::Common::Session::FileManager#file_content
- added parameter
mode:
to options can be used as well
- added parameter
Eco::API::UseCases::OozeSamples::Helpers::Shortcuts#same_string?
- Added parameter
mild:
to compare the strings with only alphabetic characters
- Added parameter
Eco::API::UseCases::OozeSamples::OozeRunBaseCase
#main
and#process_ooze
methods were not obvious to use
Eco::API::UseCases::OozeSamples::RegisterUpdateCase
slight change on therun
summary message
Fixed
Eco::API::UseCases::OozeSamples::OozeBaseCase#update_ooze
- Added call to
validate
also when we are ondry-run
mode
- Added call to
[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 thesource_folder
Changed
- upgrade
ecoportal-api
andecoportal-api-v2
dependencies
[2.0.52] - 2022-03-04
Added
Eco::API::UseCases::DefaultCases::CleanUnknownTags
includedefault_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 personEco::API::MicroCases#take_email_from_account
with given an account associated to anemail
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 acsv
with alltag
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 asinfo
, rather thanwarn
[2.0.49] - 2022-02-14
Added
Eco::API::Session::Batch::RequestStats#message
now it shows which details have changedEco::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 :/)
- Call to
[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)
- It is possible to extend or override
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
- To return
Fixed
- Changed the
workflow
inon(: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
- It was not retrieving the
[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 errorsEco::API::Policies::DefaultPolicies::UserAccess
changed logging fromwarn
toinfo
.
[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
version0.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
inbefore(:post_launch, :usecases)
=> post launch cases are not prevented for partial updates- rectified message
run(:post_launch, :usecases)
=> missing people error will log indebug
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 ascsv
- invokable via
-entries-to-csv
- invokable via
- More errors:
Eco::API::Error::ExternalIdTaken
Eco::API::Error::InternalServerError
- Added option
processed-people-to-csv file.csv
to export acsv
with the results of processing people- This option allows to preview the final data when launching a
dry-run
(-simulate
)
- This option allows to preview the final data when launching a
- Added ooze case sample
Eco::API::UseCases::OozeSamples::TargetOozesUpdateCase
- Allows to retrieve the target entries based on a
csv
- Allows to retrieve the target entries based on a
Changed
- Moved methods of
#person_ref
,#get_attr
and#get_row
as class methods ofEco::API::Session::Batch::Feedback
Eco::API::Session::Errors
methods above to use them viaFeedback
class
Eco::API::Session::Errors::ErrorCache
: added new propertyresponse
#by_type
added parameteronly_entries
to specify the output type#errors
capture theresponse
in the generatedErrorCache
object
Fixed
Eco::API::Session::Config::Workflow#run
to validate callback output class- It should be a
Eco::API::UseCases::BaseIO
- It should be a
- 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 currentJob
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
- Saved
[2.0.40] - 2021-09-29
Added
- Unique access point for
validation
via core caseEco::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
- Moved helpers from
Fixed
Eco::API::UseCases::OozeSamples::RegisterUpdateCase
- fix launch condition to be
Y
- fix
search
method call
- fix launch condition to be
- Changed the
workflow
to prevent re-cache of people whenpeople
was not used
[2.0.38] - 2021-09-07
Added
Eco::CSV::Table
some more helpers to manage inputcsv
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 whenpeople
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 switchingtarget
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 thetarget
is going to change
Changed
Eco::API::UseCases::OozeSamples::Helpers::Shortcuts#object_reference
improved reference textEco::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)
- actual
[2.0.34] - 2021-08-28
Added
Eco::API::UseCases::OozeSamples::OozeBaseCase
refactored ooze base caseEco::API::UseCases::OozeSamples::RegisterUpdateCase
new case for full register update
Changed
Eco::API::UseCases::OozeSamples::OozeRunBaseCase
made child ofOozeBaseCase
and simplified to its essentialEco::API::UseCases::OozeSamples::OozeUpdateCase
remove unnecessary code and helpers that are now inherited fromOoozeBaseCase
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 docdocx
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
, helperwith_stage
[2.0.32] - 2021-07-14
Fixed
Eco::API::UseCases::OozeSamples::OozeUpdateCase
prompting user, fixed typoEco::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 thefields_map.json
to identify the headers.
Fixed
Eco::API::Common::People::DefaultParsers::XLSParser
should return allString
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 :/
- What a mess this was doing to the
[2.0.27] - 2021-07-05
Changed
- Parent class
Eco::API::UseCases::DefaultCases::ToCsvCase
shouldn't know header maps necessary forEco::API::UseCases::DefaultCases::ToCsvDetailedCase
- Moved related header maps to
ToCsvDetailedCase
- Moved related header maps to
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 receivedata
to re-scope if the data is available (most specifically#internal_attrs
)Eco::API::Common::People::PersonEntry
, where when setting the final values onPerson
, it should include any internal attribute that is present in thefinal_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 onfirst-name
&surname
, ANDdetails-name
depends onname
[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 indry-run
mode- when in
dry-run
it will not reload the people base of the session
- when in
- 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 ofMicroCases
Eco::API::MicroCases#with_each
: where internally the search is performed against a copy of thePeople
object.Eco::API::MicroCases#with_each_starter
- when
--help
is invoked option to filter the shown-options
,-usecases
andfilters
by a word contained in the option.
- invokable on cli via
- 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 theRequiredAttrs
, where defined - the new method
#required_attrs
to expose the injectedRequiredAttrs
- new keyed argument
check_headers:
inEco::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 totrue
Eco::API::Common::People::DefaultParsers::CSVParser
- added option
check_headers
viadependencies
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 parametersEco::API::Organization::People
: internally@by_id
cache Hash includednil
values => not any more.- removed unused methods on patches for
Ecoportal::API::V1::Person
andEcoportal::API::Internal::Person
- specifically
#reset_account!
and#consolidate_account!
as well as#reset_details!
and#consolidate_details!
- specifically
- internal changes in
Eco::API::Common::People::Entries#entry
- added option to trigger
MultipleSearchResults
StandardError when multiple candiates are found. - removed
nil
values from thecaches
(the Hashes to optimize the search)
- added option to trigger
- slight structure refactor of
Eco::API::Common::Loaders
- moved base class to subfolder/namespace
- decoupled pure
Loader
logics toLoaders::Base
and use case inheriance chain loader toLoaders::CaseBase
Eco::API::Session::BatchJob
thepost_launch
:- sets the
id
to theperson
if it was created successfully - when in
dry-run
it fakes theid
with a counter
- sets the
Eco::API::Common::People::PersonFactory
getssubordinates
initialized to0
(when creating anew
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
- for backwards compatibility
Fixed
Eco::API::Session::Batch
fixed typo that would preventprompt_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
- also added new option
[2.0.23] - 2021-06-22
Added
Eco::API::Session::Batch::Job
new option (-save-requests
) to save requests even if indry-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
inBaseLoader
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 theirsource_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
filesEco::API::Common::People::DefaultParsers::XLSParser
the Excel files parserEco::API::Common::People::PersonParser
added:xls
as an accepted formatEco::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 specificMissingParameter
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
androo-xls
- we just kept
- custom
Error
classes now all inherit fromStandardError
(rather thanException
)
[2.0.21] - 2021-06-04
Added
Eco::CSV::Table
, support to create the table out of anArray<Hash>
- 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 viaclean-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
androo-xls
- dependencies to
hashdiff
Eco::API::Session#parse_attribute
=> added missing parameterdeps:
- 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: whenSystemStackError
there is notbacktrace
:/
[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 fromEco::API::Organization::People#find
Eco::API::MicroCases#with_each
will offer the selection of candidates
Changed
- renamed and repurposed
Eco::API::Organization::PeopleAnalytics
toPeopleSimilarity
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 forperson_abilities
abilityEco::API::Organization::PresetsFactory
#validate
: returns anArray
with all the errors that apermissions_custom
has#valid?
: checks if apermissions_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
andjaro_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 ManagerEco::API::UseCases::DefaultCases::AnalysePeople
invokable via-analyse-people
- Added dependencies to
- 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 theASSETS.session
might already be linked to the specific invoked environment
- At this stage of the execution workflow it uses
- New method helpers in
Ecoporta::API::MicroCases
preserve_filter_tags
,preserve_default_tag
andpreserve_policy_groups
Changed
- upgraded dependency on
ecoportal-api
andecoportal-api-v2
- removed
Eco::API::MicroCases#refresh_abilities
Eco::API::MicroCases#set_account
removedrefresh_abilities
Eco::API::MicroCases#append_usergroups
removedrefresh_abilities
- removed usecase
Eco::API::UseCases::DefaultCases::RefreshAbilitiesCase
(-refresh-abilities
)
Eco::API::Policies::DefaultPolicies::UserAccess
: removedrefresh_abilities
- removed
Eco::API::Session#new_preset
Eco::API::Organization::PresetsFactory
- removed
rspecs
.new
: removed parameterspresets_custom
&presets_map
- removed constants
DEFAULT_CUSTOM
, andDEFAULT_MAP
- removed private methods
#presets_custom
and#presets_map
- changed private method
#compile
receives directly an array ofpermissions_custom
- removed
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
inEco::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:-api-key INTERNAL_API_KEY
-enviro [live|pre.dev]
-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
preventrescue
looping
[2.0.14] - 2021-04-15
Added
Eco::API::UseCases::DefaultCases::ToCsvCase
added option-internal-names
to avoid overriding data on exportEco::API::Common::People::PersonEntry#mapped_entry
exposed method for rawcsv
generationEco::API::Organization::PresetsFactory
added integrity validation forperson_*
abilitiesEco::API::Session::Batch::Job
more debug info on erron handlers
Fixed
Eco::API::Error.get_type
was almost always matchingEco::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
changedArray#filter
call toArray#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
- Renamed
[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
andEco::API::Session::Batch::Jobs
: when newBatch::Job
s are creating during launch, they remained unlaunched- this fix makes
#launch
method to iterate until there are no pending
- this fix makes
[2.0.6] - 2021-03-08
Changed
Eco::API::Session::Batch:Errors
moved some methods to be private
Fixed
Eco::API::Error
should inherit fromStandardError
, rather than fromException
[2.0.5] - 2021-02-24
Fixed
Eco::API::Common::People::PersonParser#symbol_keys
to useArray#select
- as
Array#filter
was introduced in ruby2.5.5
- as
[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
toecoportal-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 policiesEco::API::Common::Session::Logger
: add caching of logsEco::API::Common::Session::Logger::Cache
new class to manage cached logsEco::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 launchEco::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 correcthost
- this could have launched an
api
request tolive.ecoportal.com
when targetingpre.dev
- this could have launched an
[1.5.12] - 2021-02-01
Added
Eco::API::Common::People::DefaultParsers::CSVParser
when cell content isNull
, capturenil
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 haveyield_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 detectionEco::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
andEco::API::Custom::Parser
- please, notice that you should create new classes under the following namespaces
Custom::UseCase
: custom use casesCustom::Policy
: custom policyCustom::ErrorHandler
: custom error handlerCustom::Parser
: custom parser- this also allows to inherit from existing defaults and models (models to come)
- helper classes to inherit from:
- implemented first microcases (evaluation stage): to be able to centralize common code between use cases
- see
Eco::API::MicroCases
class
- see
- command line added
--help
to list allusecases
,options
andfilters
--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
- input data:
- 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 forconfig.batch_policies
provided that you can limit themax
and/ormin
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
- now includes
- errors improved error message when setting values to a
person
from anentry
:- it now shows the row number
- it now gives the specific value that failed in case of
Exception
Eco::API::Common::DefaultPasers::LoginProvidersParser
: made nativeEco::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
andEco::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
torestore-db
- renamed
- removed
Eco::API::Session::Tasks
: all the helpers have been moved and documented as part ofEco::API::MicroCases
(some have been renamed)- as a consequence, removed method
Eco::API::Session#do
- as a consequence, removed method
Eco::API::Common::People::PersonEntry#to_hash
has been removed- now you should use the more explicit
Eco::API::Common::People::PersonEntry#external_entry
- now you should use the more explicit
- internal refactor of
Eco::API::UseCases::DefaultCases
:- made so they inherit from
Eco::API::Common::Loaders::UseCase
and cases are autoloaded during run-time
- made so they inherit from
- internal refactor of input entries processing:
Eco::API::Common::People::PersonEntry
internal refactor- need to make the code clearer and make the
parsing
andserializing
symmetrical- the
serializers
were expecting anEcoportal::API::V1::Person
, which was at a different to that of when theparsers
kicked in. - now it has been introduced the possibility to launch the serializer in a different stage of the process
- the
- 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
offerscategory
parameter so you can have multiple parsers and serializers per each parser/serializer (one per category).Eco::API::Common::People::PersonParser
usescategory
to define aphase
when theparser
or theserializer
should be active => the expected object in the parsercallback
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 aHash
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 configsession.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 usingencoding
parameter properly.Eco::API::Common::People::DefaultParsers::CSVParser
does atstrip
(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
- 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
- some use cases where giving incorrect row number, fixed so they do:
Eco::API::Common::People::EntryFactory#entries
addsidx
key to eachentry
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
- this fix makes the
Ecoportal::API::Internal::Person#account_added
fixed typoEcoportal::API::Session::Batch#get_people
should returnArray<Person>
invariably
[1.5.1] - 2020-10-08
Added
presets_values.json
: added the new abilitytasks
(eP release1.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 launchaccount_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 codeEco::API::Common::DefaultPasers::PolicyGroupsParser
: made native, as it is a very common parserEco::API::Common::DefaultPasers::FreemiumParser
to parse/serialise booleanEco::API::Common::People::PersonParser
: addedfreemium
as core attributeEco::API::UserCases::DefaultCases::RecoverDBCase
: recovers alsofreemium
- 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 apiv2
- you can manage your keys directly on the apis configuration
- added
external_key:
,user_key:
andapis.default_user_key
- added basic support for api
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
beforeEco::API::Common::People
Eco::API::Common::People::EntryFactory
: made child ofEco::API::Common::Session::BaseSession
- refactored all the
api
connection creation for simplicity and to support multi api version - delegated
Eco::API::Session::Batch#get
toEcoportal::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
andEco::CSV#read
should use the properencoding
when it'sbom
- 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
- apparently, this can only be achieved by passing an argument such as
[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
andEco::CSV#read
should use the proper:encoding
when it'sbom
[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 thedefault_usergroup
[1.3.17] - 2020-07-06
Changed
- the
hris
case should not only include asleavers
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 emptybody
on response
[1.3.16] - 2020-06-26
Added
Eco::API::Common::People::Entries
,#entry
&#find
should allow forstrict
search (added parameter)
Changed
- upgraded
ecoportal-api
gem dependency to minimum version0.5.7
- this includes the removal of some patches
- some gems update
Fixed
- patched preferences (
kiosk
preferences should default tonil
)
[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 version0.5.6
[1.3.13] - 2020-05-29
Fixed
Eco::API::Organization::TagTree#tag?
to acceptnil
by returningfalse
Eco::API::Common::People::DefaultParsers::DateParser
will parse toDate
class- it was parsing to
Time
class, while the native gemecoportal-api
parses asDate
(reference)
- it was parsing to
[1.3.12] - 2020-05-19
Changed
- stop using
email
asexternal_id
onPeople#person
&People#find
- this should result in more accurate searches when using
:strict
options
- this should result in more accurate searches when using
[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 forArray
inputconfig.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
- on account creation, if the input file did not specify
Fixed
upsert
,hris
andcreate
usecases: fixed condition for use of default_usergroup
[1.3.9] - 2020-05-12
Fixed
usecase
callback was not receivingusecase
paramater- as a consequence
Batch::Job
created were missing theusecase
- as a consequence
[1.3.8] - 2020-05-07
Added
- this change log file
config.people.default_usergroup
, when defined, will have effect on usecases:create
,upsert
andhris
- on account creation, if the input file did not specify
policy_group_ids
- on account creation, if the input file did not specify
Changed
policy
callback to receive new parameter with theBatch::Job
that it is currently processing/checking
**Example of usage__
ASSETS.config.policies do |policies|
policies.define("update-status") do |people, session, , 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.