- Introduced `getAssociated` method to retrieve either `Person`, `ThirdParty`, or `null`.
- Provides a unified accessor combining `person` and `thirdParty` properties.
- Introduced `TriggerAuditInterface` to define the contract for triggering audit events.
- Implemented `TriggerAuditService` to encapsulate audit event creation and persistence logic.
- Added methods to handle audit actions with metadata and translatable descriptions.
- Added new French translations for audit trail download states in `messages.fr.yml`.
- Updated `waitForDump` endpoint to render a Twig template with download status.
- Created `download.html.twig` to display the download status with dynamic messages for different states.
- Created `waiting_download` module with main `App.vue` component.
- Integrated polling logic to check stored object status using the `/is-ready` endpoint.
- Displayed messages for pending, stopped, failure, and ready states with a "Download" button for ready objects.
- Added `StoredObjectReady` type and updated types for improved type safety.
- Dynamically mounted the module using dataset attributes.
- Introduced `/1.0/doc-store/stored-object/{uuid}` endpoint to fetch the content of a stored object by UUID.
- Implemented access control using `StoredObjectRoleEnum::SEE` permission.
- Added OpenAPI specification for the new endpoint, including path parameter `uuid` and response codes `200` and `403`.
- Introduced `/1.0/doc-store/stored-object/{uuid}/is-ready` endpoint to retrieve the status of a stored object.
- Added path parameter for `uuid` and returned `status` property with `empty`, `ready`, `pending`, or `failure` states.
- Added French translations for audit trail count and export limit messages in `messages+intl-icu.fr.yaml`.
- Updated `list.html.twig` to display the total number of audit items and a message if items exceed the exportable limit (`MAX_LINES`).
- Display a download button if the total number of audit trail items is within `MAX_LINES`.
- Added the download action as a form submission with the appropriate route.
- Introduced `AuditDumpRequestHandler` to handle `AuditDumpRequestMessage` with transactional safety.
- Added custom exceptions `AuditDumpTooMuchLines` and `AuditDumpAlreadyGeneratedException` for enhanced error reporting during processing.
- Created unit tests in `AuditDumpRequestHandlerTest` to validate normal processing, exception handling, and edge cases.
- Implemented locking mechanism and state management for `StoredObject` while processing requests.
- Added `generateDump` method to handle audit trail dump creation and queue a processing request.
- Introduced `waitForDump` endpoint to retrieve the status of a pending dump.
- Updated controller dependencies to include `MessageBusInterface`, `EntityManagerInterface`, `ClockInterface`, and `UrlGeneratorInterface`.
- Marked `AuditTrailSearchController` as `readonly` for improved immutability.
- Added `AuditDumpAlreadyGeneratedException` and `AuditDumpTooMuchLines` exceptions to improve error reporting during dump operations.
- Introduced `MAX_LINES` constant to limit the number of lines in dumps.
- Modified `dump` method to accept a `StoredObject` as a parameter and handle its state transitions.
- Updated `AuditEventDumperTest` to reflect changes in `dump` method and validate error scenarios.
- Introduced a memory-efficient iterable result method to handle large datasets.
- Ensures data is streamed without loading all rows into memory, improving performance for extensive audit trail processing.
- Added a `format` parameter to `display` methods in `PersonSubjectDisplayer`, `AccompanyingPeriodWorkSubjectDisplayer`, and `AccompanyingPeriodSubjectDisplayer` to support `html` and `string` outputs.
- Injected `PersonRenderInterface` and `TranslatorInterface` into relevant classes for improved non-HTML rendering capabilities.
- Refactored rendering logic to accommodate flexible output formatting.
- Introduced a test case for `AuditEventDumper` to ensure proper CSV generation and storage.
- Verified metadata, user, and entity subject data accuracy in the dumped output.
- Added `AuditEventDumper` class to generate and store CSV exports of audit events based on search criteria.
- Updated `SubjectDisplayerInterface` and related classes to support multiple output formats (`html` or `string`) for subject rendering.
- Introduced `RemoveOldAuditCronJob` class implementing `CronJobInterface` to delete old audit trails based on configured retention period.
- Added `deleteBefore` method to `AuditTrailRepository` to handle removal of records older than the specified date.
- Created `RemoveOldAuditCronJobTest` to ensure correct functionality for job execution and canRun logic.
- Updated DI configuration to include the `delete_after` parameter for audit trail retention settings.
- Added `countByCriteria` method in `AuditTrailRepository` to retrieve the total count of records based on criteria.
- Injected `PaginatorFactoryInterface` into `AuditTrailSearchController` and updated the controller to handle pagination logic.
- Updated the `list.html.twig` template to render the pagination controls using `chill_pagination`.
- Extended `AuditTrailRepository` to include user-based query filtering.
- Updated `AuditTrailSearchController` to handle `by_users` filter criteria.
- Modified translations and templates to support the new user picker field in the search form.
- Injected required CSS and JS assets for the user picker functionality.
- Updated `convert` method to append associated subjects when `$includeAssociated` is true.
- Modified `SubjectConverterManager` to pass `$includeAssociated` to converters during subject resolution.
- Introduced filters for date range, course number, and person number using `FilterOrderHelper`.
- Updated `AuditTrailSearchController` to build and process filtering criteria dynamically.
- Enhanced translations and updated templates to render the new filter options.
- Moved query-building logic to a new `buildByCriteriaQuery` private method for better modularity.
- Added handling for `from_date`, `to_date`, and subject-based filtering using `JSONB` containment for improved query flexibility.
- Introduced methods to define, retrieve, and process integer fields in `FilterOrderHelper` and `FilterOrderHelperBuilder`.
- Updated `FilterOrderType` to render integer fields dynamically as form inputs.
- Added corresponding support in `FilterOrderGetActiveFilterHelper` to handle integer field data.
- Updated `FilterOrderPositionEnum` and template files to include integer field rendering logic.
- Enhanced entity labels with translation capabilities where applicable.
- Introduced `JsonbContains` class to enable the usage of PostgreSQL's JSONB containment operator in DQL queries.
- Created `JsonbContainsTest` to validate the functionality of the custom DQL function.
- Updated methods to accept `string|TranslatableInterface` for label parameters, allowing translation capabilities.
- Added `Symfony\Contracts\Translation\TranslatableInterface` imports in both classes.
- Replaced `Subject|array` return types with `SubjectBag` in `SubjectConverterInterface` for more robust handling.
- Updated `getSubjectsForEntity` to include an optional `$includeAssociated` parameter for finer control over associated subject resolution.
- Refactored `AuditEvent` to differentiate `mainSubject` from associated subjects, improving clarity in audit logging.
- Introduced database schema changes to add `main_subject` and `subjects` columns in the `chill_main_audit_trail` table.
- Added `SubjectBag` class for grouped subject management and implemented deduplication logic.
- Updated all converters and test cases to use the new `SubjectBag` approach, ensuring compatibility.
- Improved event dispatching in controllers to utilize the updated `AuditEvent` structure and refined metadata handling.
- Removed redundant null-check logic for `user_id` assignment.
- Updated query to directly handle optional users with safe navigation and nullable type support.
- Changed `getUser` method in `AuditTrail` to allow null values by updating the return type to `?User`.
- Updated `insert` method in `AuditTrailRepository` to handle nullable users, ensuring the `user_id` parameter is set only when applicable.
- Improved code robustness by adding null-check logic for user assignment in the SQL query.
- Removed `convertEntityToSubjects` method from `SubjectConverterManager` and updated all references to use `getSubjectsForEntity`.
- Ensured `getSubjectsForEntity` always returns an array by wrapping single `Subject` instances.
- Replaced manual type handling in converters with `array_push` and improved code clarity in `AuditEvent2Trail` and related tests.
- Updated and fixed tests for the modified subject conversion logic to maintain coverage.
- Implemented `AccompanyingPeriodWorkSubjectConverter` to handle subject conversion for accompanying period work entities.
- Added unit tests to ensure proper functionality of the new converter.
- Integrated `AuditEvent` dispatching into `AccompanyingCourseWorkController` for viewing and listing accompanying period works.
- Added `AccompanyingPeriodSubjectConverter` to handle subject conversion for accompanying periods.
- Integrated `AuditEvent` dispatching into `AccompanyingCourseController` for key actions (e.g., create, view, update, delete, reopen).
- Extended translations to include audit-related messages for accompanying periods.
- Introduced tests for `AccompanyingPeriodSubjectConverter` to ensure proper functionality.
- Introduced `SubjectConverterManagerAwareTrait` and `SubjectConverterManagerAwareInterface` for injecting subject converter manager into converters.
- Added `getSubjectsForEntity` method in `SubjectConverterManager` to centralize subject retrieval logic.
- Updated converters to set the subject converter manager when applicable.
- Updated `PersonController` to dispatch `AuditEvent` with `AUDIT_VIEW` action instead of `PrivacyEvent`.
- Added necessary `AuditEvent` and `AuditTrail` imports to the controller.
- Registered `SubjectConverterInterface` for autoconfiguration with the `chill_main.audit_subject_converter` tag.
- Added `audit.yaml` to configure audit-related services and enable service discovery for the `Audit` namespace.
- Updated `services.yaml` to include the new `audit.yaml` configuration.
- Created `PersonSubjectConverter` class implementing `SubjectConverterInterface` to convert `Person` entities into `Subject` instances.
- Registered the `Audit` namespace in `services.yaml` to enable automatic service discovery.
- Replaced `array_map` with `array_reduce` in `AuditEvent2Trail` for flattening converted subjects.
- Enhanced `SubjectConverterInterface` with a `supportsConvert` method and PHPStan annotations to improve type safety and flexibility.
- Introduced `AuditTrailPersisterInterface` to define the persisting contract.
- Updated `AuditTrailPersister` to implement the interface and delegate persistence to `AuditTrailRepository`.
- Added `AuditTrailRepository` with `persistImmediately` method to save audit trails directly to the database.
- Implemented `AuditEvent` class to represent audit events.
- Added `AuditEvent2Trail` for converting events to audit trails.
- Introduced `Subject` and `SubjectConverterManager` for subject conversion.
- Created contracts like `SubjectConverterInterface` and `AuditEvent2TrailInterface`.
- Developed `AuditEventSubscriber` to persist audit events using `AuditTrailPersister`.
- Included test classes for core audit services and components.