Project

General

Profile

Actions

Task #1259

closed

Generate values during create entity

Added by Ondřej Kopr over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Generating values
Target version:
Start date:
09/18/2018
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Its required generate some values for entities during create. For example username, eav's etc.

  • create new entity,
  • create new agenda,
  • create process generate value/s,
  • generators are registered for entity and attribute - this information is saved in DB

Related issues

Related to IdStory Identity Manager - Feature #1261: Supports AbstractDto as entity type in processorsClosedRadek Tomiška09/20/2018

Actions
Related to IdStory Identity Manager - Task #1267: Support save EAV with EntityClosedRadek Tomiška09/24/2018

Actions
Related to IdStory Identity Manager - Task #1272: Eav attribute - default value as placeholderClosedRadek Tomiška09/26/2018

Actions
Related to IdStory Identity Manager - Feature #890: Generate login when saving a userClosedOndřej Kopr01/04/2018

Actions
Actions #1

Updated by Ondřej Kopr over 5 years ago

  • Subject changed from Generate values during create identity to Generate values during create entity
Actions #3

Updated by Ondřej Kopr over 5 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Ondřej Kopr over 5 years ago

  • Related to Feature #1261: Supports AbstractDto as entity type in processors added
Actions #5

Updated by Ondřej Kopr over 5 years ago

  • % Done changed from 0 to 10

New entity IdmGeneratedAttributes was create - service, controller, repository, dto, ....
New manager that supports generating and get supported types was created.
New interface and abstract class for generators - ValueGenerator, was created.

Now I start with implement frontend agenda.

Actions #6

Updated by Ondřej Kopr over 5 years ago

  • % Done changed from 10 to 30

Frontend agenda was implemented. Now is possible made CRUD operation from frontend.

Actions #7

Updated by Ondřej Kopr over 5 years ago

  • Related to Task #1267: Support save EAV with Entity added
Actions #8

Updated by Radek Tomiška over 5 years ago

  • Related to Task #1272: Eav attribute - default value as placeholder added
Actions #9

Updated by Ondřej Kopr over 5 years ago

  • % Done changed from 30 to 60

Basic implementations with 3 generators and tests for it are complete. Now I start with implement generator for EAV values (EAV constant and EAV default values)

Actions #12

Updated by Ondřej Kopr over 5 years ago

Basic implementations with defaults generators and tests for it are complete. I made some changes after colleague's feedback:

  • I remove generator for EAV constant, second EAV generator 'default values' still exists,
  • add settings for username generator - use first firstname or lastname,
  • email generator now extends username generator and works with same behavior,
  • generators with order 0 - 10 can be set only by system from admin interface its not possible, check was added into controller,
  • localization was fixed,
  • some default values for generator settings was changed
Actions #13

Updated by Ondřej Kopr over 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 60 to 80

Tests was updated. Please Radek could you made a part of review? Works:

  • generators behavior and agenda works,
  • tests,
  • er diagram,
  • changelog.
thinks to be done:
  • Documentation - now exists only some introduce,
  • create new default EAV value generator when IdM init,
  • check if email exists - now isn't possible check this, because filtering by email doesn't exist. I haven't time to implement this filtering.

Branch: https://github.com/bcvsolutions/CzechIdMng/tree/okopr/1259-generated-values
compare: https://github.com/bcvsolutions/CzechIdMng/compare/okopr/1259-generated-values

Thank you :-) And please don't merge the branch, I have some feedback for discuss with you guys. Thank you.

Actions #14

Updated by Radek Tomiška over 5 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Radek Tomiška to Ondřej Kopr

I did test and review. Feature works, thx!

I fixed / changed + notes:
  • i fixed change script for postgresql (binary, datetime type not exist, generator_properties missing in audit table) and used actual script number (V9_02_003)
  • index on entity was missing (just in change script)
  • i removed interface 'Generable' - supported dto types are loaded by registered generators. Dto is used for supported types => entities are not used for generators. All services was refactored.
  • after discussion we decide to rename some dtos and entities.
  • i don't understand, why cleverness with system seq was added:
    • i don't see a reason, why administrator should be limited this way?
    • and initialization of system generators is not implemented.
    • or why 'unmodifiable' flag wasn't used as on other places (e.g. eav attributes)?
  • check seq for system generator moved to standard validation method
  • some result codes missing in localization (e.g. GENERATOR_RETURN_NULL ..)
  • enabled evaluator used instead module service (and it's used on right place in manager) - maybe all vs. available generator method can be added (e.g. when module is disabled, then previously configured generators are not shown properly)
  • some nice name can be used for generators (used in localization)
  • generateItem vs generate - remove please generateItem method (Assert.notNull(...) can be defined - if needed - in implementations).
  • parameter dtoType is not used in controller getAvailableGenerators method - remove it please for now (i don't know, if path parametr is suitable for it so we can add it in future)
  • filter on FE uses duplicate ref - move filter to standalone component (see notification filter)

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/d57ea5f701f8f70807405d5ea79c08533cd30ee3

Actions #15

Updated by Ondřej Kopr over 5 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška

Thank you for fixing the issues with generates values. Please could you reimplement/implement the last issues, then I add documentation and it will be possible, close the ticket. Thank you Radek.

Actions #16

Updated by Radek Tomiška over 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • % Done changed from 80 to 90

I've implemented all notes and merge feature into develop.

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/4085ce46ae2148f04f55403e01e0553daa4f320d

Could you do a feedback again and add doc, pls?

Actions #17

Updated by Ondřej Kopr over 5 years ago

  • Status changed from Needs feedback to In Progress

Thank you for fix issues and clean code. Behavior with unmodifiable is better than seq. Now missing only documentation.

Actions #18

Updated by Ondřej Kopr over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100
Actions #19

Updated by Ondřej Kopr over 5 years ago

  • Related to Feature #890: Generate login when saving a user added
Actions

Also available in: Atom PDF