Commit Graph

11955 Commits

Author SHA1 Message Date
5dfbdad13d Release 2.24.0 2.24.0 2024-09-11 14:31:52 +02:00
b3e2d4ff9f Merge branch '306-invalidate-downloaded-document' into 'master'
Remove documents from memory after download

Closes #306

See merge request Chill-Projet/chill-bundles!727
2024-09-11 12:29:37 +00:00
01c2848a83 Fix deprecated method in redis 2024-09-11 14:23:23 +02:00
d0ee381627 Upgrade of php-cs-fixer 2024-09-11 14:21:32 +02:00
8b1b255050 Remove documents from memory after download
Implemented functionality to remove documents from browser memory 45 seconds after they are converted or downloaded. This ensures that clicking the download button again re-downloads the document. The reset state function was added to both ConvertButton.vue and DownloadButton.vue components.
2024-09-11 13:22:49 +02:00
f0d581b7f8 Merge branch '291_workflow_pdfsignedmessagehandler' into 'signature-app-master'
Lorsque tous les usagers ont signé un workflow, le workflow retourne à l’envoyeur avec une étape « workflow signé »

See merge request Chill-Projet/chill-bundles!726
2024-09-11 07:23:51 +00:00
nobohan
1197a46f5f Refactor PDF signature handling and add signature state changer
Simplified PdfSignedMessageHandler by delegating signature state changes to a new SignatureStepStateChanger class. Added utility method to EntityWorkflowStepSignature for checking pending signatures and created new test cases for the SignatureStepStateChanger.
2024-09-10 21:27:55 +02:00
00e878892e Merge branch '305-convert-to-pdf-on-signature-step' into 'signature-app-master'
Convert a document to pdf when an entity workflow arrives in a signature step

See merge request Chill-Projet/chill-bundles!724
2024-09-10 18:42:10 +00:00
941444b7d5 Add event subscriber to convert docs to PDF before signature
Introduce ConvertToPdfBeforeSignatureStepEventSubscriber to convert documents to PDF when reaching a signature step in the workflow. Includes tests to ensure the conversion process only triggers when necessary.
2024-09-10 17:48:32 +02:00
a60ea0e066 Add StoredObjectToPdfConverter service and unit tests
Introduced the StoredObjectToPdfConverter service to handle conversion of stored objects to PDF format. Added unit tests to ensure proper functionality, including versioning and exception handling.
2024-09-10 17:48:32 +02:00
1ddd283f26 Add signer type differentiation for workflows
Added a method to determine if the signer is a 'person' or 'user'. Updated the signature template to handle both types accordingly, ensuring the correct entity type is displayed in workflow signatures.
2024-09-10 17:48:32 +02:00
669b967899 Enhance object version removal to exclude point-in-time versions
Add a check to exclude versions associated with points in time before deleting old object versions. This ensures that such versions are not mistakenly removed, providing greater data integrity. Updated tests and repository methods accordingly.
2024-09-10 17:48:31 +02:00
d33da6519a Add StoredObjectPointInTime entity and related functionality
Implemented a new StoredObjectPointInTime entity to manage snapshots of stored objects. This includes related migrations, enum for reasons, repository, and integration with StoredObjectVersion.
2024-09-10 17:48:31 +02:00
f5ba5d574b Add WopiConverter service and update Collabora integration tests
Introduce the WopiConverter service to handle document-to-PDF conversion using Collabora Online. Extend and update related tests in WopiConvertToPdfTest and ConvertControllerTest for better coverage and reliability. Enhance the GitLab CI configuration to exclude new test category "collabora-integration".
2024-09-10 17:48:31 +02:00
ccc11b1c1d Merge branch '295-cancel-workflow-after-90-days' into 'signature-app-master'
Create CancelStaleWorkflow message, handler and cronjob

See merge request Chill-Projet/chill-bundles!720
2024-09-09 13:27:12 +00:00
2fb46c65c2 Refactor CancelStaleWorkflowCronJobTest to simplify setup
Replaced KernelTestCase with TestCase to simplify test setup and removed dependency on the database connection. Added NullLogger to replace mocked LoggerInterface during testing. Updated method call in tests to correctly reference CancelStaleWorkflowMessage class.
2024-09-09 15:16:10 +02:00
f4356ac249 Add test for detecting stale workflows and enhance handler
Added a new test to check if workflows are stale in EntityWorkflowTest. Enhanced CancelStaleWorkflowHandler to handle stale workflows more accurately, including checking if workflows have transitioned recently. Updated EntityWorkflow entity to cascade remove workflow steps.

Refactor tests for handler, to avoid using $kernel during tests
2024-09-09 15:08:39 +02:00
d152efe084 Refactor imports and remove redundant type strings
This commit refactors the usage of \DateTimeImmutable to ensure consistent namespacing and removes unnecessary string type declarations from constants in CancelStaleWorkflowCronJob. These changes improve code readability and maintainability.
2024-09-09 14:58:19 +02:00
ee9530d03f More conditions to find staled workflows 2024-09-09 10:46:35 +02:00
b97eabf0d2 Get workflowComponent directly from registry 2024-09-09 10:46:35 +02:00
2e69d2df90 Adjust test to work with actual workflow + minor fix of handler logic 2024-09-09 10:46:33 +02:00
cb446edd18 Suffix message class with 'Message' and add check on workflow to assert no transitions were applied since message placed in queue 2024-09-09 10:40:42 +02:00
5d84e997c1 Php cs fixes 2024-09-09 10:40:42 +02:00
35199b6993 Create test for CancelStaleWorkflowHandler: wip state 2024-09-09 10:40:42 +02:00
dab68fb409 Add CancelStaleWorkflowCronJobTest 2024-09-09 10:40:41 +02:00
6001bb6447 Add logger messages for possible debugging purposes 2024-09-09 10:40:41 +02:00
29fec50515 Add cronjob and repository method to find and cancel stale workflows every other day 2024-09-09 10:40:41 +02:00
34edb02cd0 Create message and handler for canceling stale workflows 2024-09-09 10:40:41 +02:00
860ae5cedf Create CancelStaleWorkflow message and handler 2024-09-09 10:40:40 +02:00
bf056046ab Fix cs 2024-09-06 14:40:25 +02:00
4d73f9b81a Rename Convert to ConvertController for clarity
Renamed Convert class and relevant references to ConvertController to improve clarity and maintain consistency. Updated corresponding test files and route configurations to reflect the new name.
2024-09-06 14:07:51 +02:00
dd159f4379 Merge branch '297-workflow-en-attente' into 'signature-app-master'
Allow user to put workflow on hold

See merge request Chill-Projet/chill-bundles!718
2024-09-06 12:02:40 +00:00
49ad25b4c8 Refactor WorkflowOnHoldController and improve tests
Refactored WorkflowOnHoldController to remove dependencies and improve redirect handling. Updated test cases to use PHPUnit instead of KernelTestCase and mock proper dependencies. Added relationship handling in EntityWorkflowStep to manage EntityWorkflowStepHold instances accurately.
2024-09-06 14:02:11 +02:00
ad94310981 Refactor workflow hold functionality to avoid relying on database to perform some checks on "user holds entityworkflow"
Simplify the logic in handling workflow on hold status by moving related checks and operations to `EntityWorkflowStep` and `EntityWorkflow` entities. This includes implementing new methods to check if a step or workflow is held by a specific user and refactoring the controller actions to use these methods.
2024-09-05 20:46:29 +02:00
e8f09b507f Fix cs after php-cs-fixer upgrade, fix phpstan and rector errors 2024-09-05 18:00:37 +02:00
e29e1db6ed Take into account 'destUserByAccessKey' in the list of workflows associated to a user
Refactor the query to include checks for user membership via both 'destUser' and 'destUserByAccessKey'. This ensures that workflows correctly account for user access by multiple criteria.
2024-09-05 17:38:18 +02:00
8c4f342ca1 Correct instantiation of controller within test 2024-09-05 17:19:28 +02:00
745a29f742 Adjust logic for removing the hold on a workflow only by user who owns the hold and when a transition is applied on the workflow 2024-09-05 17:19:27 +02:00
41ffc470a0 Adjust test to check creation of onHold if user is allowed to apply a transition 2024-09-05 17:19:27 +02:00
46b31ae1ea Adjust logic to only allow on hold if user is allowed to apply a transition 2024-09-05 17:19:26 +02:00
8c5e94e295 Work on test for workflowOnHold controller 2024-09-05 17:19:25 +02:00
9c8a84cdbd Add test for WorkflowOnHoldControllerTest 2024-09-05 17:19:24 +02:00
a82b99aecc Add template-extends on EntityWorkflowStepHoldRepository 2024-09-05 17:19:23 +02:00
deb4bda16e Add unique constraint as attribute on EntityWorkflowStepHold class 2024-09-05 17:19:23 +02:00
c1e5f4a57e Move onHold methods to a separate WorkflowOnHold controller 2024-09-05 17:19:20 +02:00
6fc5a10dc4 Add unique constraint to migration 2024-09-05 17:18:43 +02:00
18abc84e68 Rector fixes 2024-09-05 17:18:43 +02:00
e85c31826f php cs fixes 2024-09-05 17:18:42 +02:00
d119ba49f7 Add on_hold label to vue components 2024-09-05 17:18:42 +02:00
c21de777fd Place on_hold label next to breadcrumb in twig template 2024-09-05 17:18:42 +02:00