Skip to content

VSN-1990 : Implementing Auditing related to prepared passengers exporation actions.

yassine.elazami a demandé de fusionner VSN-1990 vers develop

Exportation Audit Feature — Detailed Merge Request Description

Overview

This merge request introduces a complete auditing mechanism for prepared passenger exportation activities. It covers the creation of dedicated services, DTOs, mappers, controller exposure, external user data retrieval, export history listing, and audit exportation. The objective is to ensure full traceability, accountability, and observability of export operations performed within the system.


Included Changes

1. feat(Audit) : Service

  • Defined the core ExportFileService.
  • Introduced the functional entry point for export audit–related operations.

2. feat(Audit) : Export Audit action

  • Added the service function signature responsible for recording prepared passenger export activity.
  • Establishes a contract for future implementations.

3. feat(Implementation) : Service Implementation

  • Implemented the ExportFileService interface.
  • Handles audit record creation, business logic execution, and data persistence.

4. feat(mapper) : Audit mapper

  • Created ExportFileAudit mapper class.
  • Enables structure transformation between persistence entities and consumable DTOs.

5. feat(dto) : User response dto

  • Introduced DTO to represent user-related information retrieved during audits.
  • Ensures structured and consistent frontend responses.

6. feat(user) : User data retrieval action

  • Defined a method signature in UserService to retrieve external user information.
  • Establishes cross-service communication requirements.

7. feat(user) : External info call impl

  • Implemented the external fetch logic for retrieving export executor details.
  • Ensures auditor identification and contextual traceability.

8. feat(mapper) : Audit Conversion

  • Added toDto method to convert ExportFileAudit entity into audit DTO.
  • Facilitates clean API responses for audit listing.

9. feat(user) : Getting user ids by name

  • Defined an external service action to retrieve collaborator identifiers based on their name.
  • Supports filtering and targeted audit inquiries.

10. feat(user) : User ids retrieval by name impl

  • Implemented name-based collaborator ID lookup in UserService.
  • Enables refined audit queries.

11. feat(audit) : Export service impl

  • Implemented logic for exporting prepared passenger exportation audit history.
  • Generates exportable output files for operational or compliance purposes.

12. feat(controller) : Audit controller

  • Defined REST controller dedicated to audit operations.
  • Added endpoint to export audit records.

13. feat(audit) : Audit feature exposition

  • Exposed audit listing functionality via REST.
  • Allows consumers to retrieve exportation audit history.

14. doc(changelog) : Changelog update

  • Updated changelog to include newly introduced auditing features and service additions.

Impact

  • Introduces complete exportation tracking and accountability workflow.
  • Enables administrators, analysts, and system owners to identify who performed data exports and when.
  • Enhances maintainability through clear service boundaries, DTO abstraction, and mappers.
  • Supports operational audits, compliance reporting, and traceability requirements.
  • Improves interoperability with external services through structured user data retrieval.

Validation and Testing

  • Verified service and implementation correctness.
  • Validated audit record persistence and retrieval.
  • Confirmed successful external user information resolution.
  • Tested mapping consistency and DTO responses.
  • Ensured API routes and controller exposure behave as expected.
  • Reviewed changelog alignment with functional changes.

Conclusion

This merge request delivers a robust auditing foundation for export operations, ensures organizational transparency, and prepares the system for future compliance and monitoring enhancements.

Closes VSN-1990

Modification effectuée par yassine.elazami

Rapports de requête de fusion