7686 Commits

Author SHA1 Message Date
nobohan
d08212df46
Signature: add and process returnPath in the signature app 2024-09-12 09:46:14 +02:00
nobohan
4933238f3f
Signature - improve UI signature app 2024-09-12 09:46:14 +02:00
nobohan
c23568032c
Signature: add a signature zone manually 2024-09-12 09:46:13 +02:00
18af2ca70b
Handle null transitionBy and improve display logic
Added checks for null transitionBy cases in workflow templates to display "Automated transition" when applicable. Also improved conditional rendering for 'destUser' and 'ccUser' fields to avoid empty elements.
2024-09-11 21:52:34 +02:00
f1505a9d15
Add locale to workflow URLs in notification templates
This is required to send notification within a console command
2024-09-11 21:16:54 +02:00
4e588ed0e0
Add logging to SignatureStepStateChanger
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.
2024-09-11 21:14:07 +02:00
70671dadac
Refactor workflow guard logic and add internal methods
Removed guard logic from EntityWorkflowTransitionEventSubscriber and created a new EntityWorkflowGuardTransition class for separation of concerns. Marked several setter methods in EntityWorkflowStepSignature as internal to guide proper usage. Added comprehensive tests to ensure the new guard logic functions correctly.
2024-09-11 21:13:58 +02: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
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
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
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
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