Uploaded image for project: 'mod-inn-reach'
  1. mod-inn-reach
  2. MODINREACH-124

Populate Auditable entity data from Folio execution context

    XMLWordPrintable

Details

    • Volaris Sprint 121, Volaris Sprint 122
    • 5
    • Volaris

    Description

      Purpose/Overview:

      The majority of DB entities should contain metadata with information about a user who created or modified the entity. Right now user information is not extracted from the request but always equal to defaults. This has to be changed in the following way:

      • extract user id from Folio execution context
      • query user data from mod-user
      • populate user name and user id in entity auditable metadata

      Auditable metadata has to be extended with "user name" for created-, modified- parts. Existing user related fields have to be renamed to simplify mapping between entities and DTO objects.

      Expected naming in Auditable object:

      Old field New field
      createdByUserId
      createdBy createdByUsername
        updatedByUserId
      lastModifiedBy updatedByUsername

      Note: Spring JPA reference provides details about auditing

      Requirements/Scope:

      • user related information extracted from request (Folio execution context) and applied to entity's auditable metadata
        • if the request is missing user data then apply the defaults
      • auditable fields renamed to simplify mapping between DB objects and DTO objects
        • excessive mapping removed from existing mappers
      • DB scripts provided to correctly modify DB structure and migrate existing data

      Acceptance Criteria:

      • AC: User related information, which includes user name and user id, correctly populated from request and saved to appropriate DB fields
      • AC: Default values applied if user cannot be identified from the request (system user)

      TestRail: Results

        Attachments

          Activity

            People

              dmtkachenko Dmytro Tkachenko
              dmtkachenko Dmytro Tkachenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases