Wrap signature state changes in transactions to prevent race conditions and ensure data integrity. Update controller and test class names to reflect broader state change capabilities. Enhance documentation with comments to clarify transaction requirements and procedure details for signature operations.
Introduced `EntityWorkflowManager` to `NotificationOnTransition` to fetch and include the entity workflow title in notifications. Updated relevant tests to support the new functionality and verify the entity title retrieval process.
Incorporated the workflow title into notification emails to provide more context to users. Updated the NotificationToUserGroupsOnTransition class and its tests to include the title from EntityWorkflowManager. Adjusted the French email templates to display the workflow title correctly.
Refactor the `WorkflowRelatedEntityPermissionHelper` to enhance permission checks for workflow-related entities. This includes updating methods, improving test coverage, and incorporating `MockClock` for date-sensitive operations.
Refactored class names and namespaces from WorkflowStoredObjectPermissionHelper to WorkflowRelatedEntityPermissionHelper across various modules. Updated associated tests and voter classes to reflect the changes, ensuring consistency and clarity in the codebase.
Refactored NotificationToUserGroupsOnTransition to utilize EntityManager for persisting EntityWorkflowStep. This ensures entities have generated IDs, leading to proper email notifications during workflow transitions.
Implemented a guard to prevent signatures on related entities that lack a stored object. It also includes corresponding tests and added translation for the error message in French.
Introduced a new validator `TransitionHasSignerIfSignature` to enforce that a signature transition must have a designated signer. Included related tests, updated DTO annotations, and added translations for new validation messages.
Introduce `EntityWorkflowGuardSendExternalIfNoPublicView` class to prevent workflows from transitioning to an external send state if the entity lacks a public view. Included unit tests to verify functionality for entities both with and without public views.
Introduced getSuggestedPersons and getSuggestedThirdParties methods across various WorkflowHandlers. These methods integrate with ProvidePersonsAssociated and ProvideThirdPartiesAssociated services to fetch related entities, enhancing the workflow handling capabilities.
Implemented the method to retrieve a list of suggested users for an entity workflow, filtering out duplicates. Added corresponding unit tests to verify the method's functionality and ensure its correctness in various scenarios.
Implemented NotificationToUserGroupsOnTransition to send group emails upon workflow completion. Also updated NotificationOnTransition to prevent double notifications and created a unit test for the new functionality.
The getTargets method now explicitly returns an array, enhancing type safety and readability. This change ensures that the return type is clear to any developers interacting with this method.
Introduce `PostPublicViewMessage` and `PostPublicViewMessageHandler` to handle external user views on public links by applying workflow transitions. Integrate with `WorkflowViewSendPublicController` and add relevant tests.
Introduced the ability to render public views for workflows, including new templates, handlers, and metadata support. Updated entity interfaces and translations to enhance the public sharing of workflow documents.
- create an event subscriber to catch the workflow which arrive to a "sentExternal" step;
- add a messenger's message to handle the generation of the email;
- add a simple message, and a simple controller for viewing the document
- add dedicated tests
- Create a dedicated constraint to check if the destUsers are required by the applied transition.
- Apply on WorkflowTransitionContextDTO and, if required, use the built-in constraints
- create tests
This commit introduces a new validator to ensure that transitions marked as 'sent' have a designated external recipient. It includes related tests for scenarios with and without recipients and covers integration with the workflow context.
Enhanced the WorkflowTransitionContextDTO to include user groups alongside individual users for future steps. Updated the relevant entity and form classes to accommodate this change and included the necessary database migration script.
Introduce MessageBus to handle post-signature operations asynchronously. This ensures that further steps are executed through dispatched messages, improving system scalability and performance. Implement new handlers and messages for the workflow state transitions.
Implemented the ability to reject workflow signatures by adding necessary templates, routes, and authorization checks. Updated the `WorkflowSignatureCancelController` to handle rejection and modified existing templates and translations to support the new feature.
Added functionality to cancel signatures in workflow, including controller, view, and tests. Updated translations and adjusted templates to support and display cancellation actions.
Integrate DuplicateEntityWorkflowFinder to prevent creating workflows for entities with existing opened or positive final workflows. Updated EntityWorkflowVoter to implement the same check before allowing creation. Removed unnecessary blank workflow parameter from Twig template.
Implemented OpenedEntityWorkflowHelper to handle final state checks for EntityWorkflow. This includes methods to determine if a workflow has reached positive or negative final steps. Added corresponding unit tests to ensure proper functionality.
Introduced EntityWorkflowGuardUnsignedTransition to block transitions with pending signatures. Implemented a new center resolver and added comprehensive unit tests for verifying transition rules and permissions.
Enhanced the SignatureStepStateChanger by integrating a LoggerInterface to provide detailed logging at key points in the state transition process. This includes informational messages when marking signatures or skipping transitions, as well as debug messages when determining the next steps.