53 Commits

Author SHA1 Message Date
37227a3aeb Add attachments to workflow 2025-02-03 21:15:00 +00:00
83ef12a2ef
Upgrade CS to PHP CS Fixer 3.65.0 (700668e) Persian Successor (was version 3.64.x) 2024-11-26 12:15:29 +01:00
875d3293d2 Workflow: set comment on previous step 2024-11-20 09:47:11 +01:00
04b2def8a5 Save the comments on a workflow step 2024-11-19 10:15:15 +00:00
64d91e2afe
Allow users to edit a document if they were added to the previous step of a workflow.
OP#826 Workflow - les utilisateurs des étapes précédentes sur un workflow doivent aussi avoir la main sur les étapes en cours du workflow (Vendee/accent-suivi-developpement/1289)

https://champs-libres.openproject.com/work_packages/826
2024-11-08 20:34:45 +01:00
071c5e3c55
Update the form to allow sending a workflow to an external destinee
OP#734 Modification du formulaire pour permettre l'envoi d'un workflow

https://champs-libres.openproject.com/work_packages/734
2024-10-04 13:41:20 +02:00
803332ba5f
Remove the feature "send a workflow to an email address" 2024-10-01 18:49:51 +02:00
17f4c85fa5
Add user group support in entity workflow steps
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.
2024-09-26 15:39:13 +02:00
9f1afb8423
Add access controls and permissions for signature steps
Implemented a Voter to enforce permissions on signature steps, ensuring only authorized users can sign steps. Updated relevant controllers and templates to reflect these permissions, and added corresponding tests to validate the changes.
2024-09-13 17:04:57 +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
2e69d2df90
Adjust test to work with actual workflow + minor fix of handler logic 2024-09-09 10:46:33 +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
15eaf648df
Add label to workflow listing and history to indicate whether it's on hold 2024-09-05 17:18:42 +02:00
313fb9ffdf
PHP CS Fixer updated (3.63.1 -> v3.64.0) 2024-09-04 14:38:56 +02:00
e17203ca3a
Add PDF signature zone availability checks
Introduce `PDFSignatureZoneAvailable` service to check available PDF signature zones. Updated `WorkflowAddSignatureController` to use the new service. Added unit tests to verify the correctness of the functionality.
2024-09-04 13:55:08 +02:00
bb848746d5
Merge branch 'upgrade-sf5' into signature-app-master 2024-08-28 13:23:12 +02:00
b0485dbcc8
Replace ArrayCollection with Collection&Selectable on some entity typing (fix previous commit)
Updated entity properties to use Collection&Selectable for better type safety and interoperability. This change affects User, Household, Calendar, Person, AccompanyingPeriod, and EntityWorkflow classes.
2024-08-28 12:04:43 +02:00
c16219dc6d
Force typing for ArrayIterator in EntityWorkflow 2024-08-28 11:48:24 +02:00
ad47804c91 Apply rector changes to Collection typing 2024-08-27 16:23:08 +02:00
85e2466611 Cherry-pick phpstan fixes after rector changes 2024-08-27 16:09:12 +02:00
db94af0958
Add support for user signatures in workflow transitions
This update introduces the ability to specify user signatures in workflow transitions. It allows a nullable user to be declared that may be requested to apply a signature. The code now handles the use-case of signing a transition by a user in addition to previous functionality of having it signed by a "Person" entity. Corresponding tests are also updated to validate this new feature.
2024-07-10 12:47:02 +02:00
b5af9f7b63
Add futurePersonSignatures property to WorkflowTransitionContextDTO
A new property named futurePersonSignatures has been added to the WorkflowTransitionContextDTO class. This will hold a list of Person objects expected to sign the next step, improving the scope of information available within the workflow context.
2024-07-10 10:40:18 +02:00
7f3de62b2c
Move the metadata on each workflow transition from the event subscriber to the entity EntityWorkflow::setStep method
The main update is in the setStep method of EntityWorkflow, where parameters are added to capture the transition details. These include the exact transition, the user who made the transition and the time of transition.

The WorkflowController extracts this information and put it into the transition's context. The MarkingStore transfer it to the EntityWorkflow::setStep method, and all metadata are recorded within the entities themselve.
2024-07-10 10:40:17 +02:00
a309cc0774
Refactor workflow classes and forms
- the workflow controller add a context to each transition;
- the state of the entity workflow is applyied using a dedicated marking store
- the method EntityWorkflow::step use the context to associate the new step with the future destination user, cc users and email. This makes the step consistent at every step.
- this allow to remove some logic which was processed in eventSubscribers,
- as counterpart, each workflow must specify a dedicated marking_store:

```yaml
framework:
    workflows:
        vendee_internal:
            # ...
            marking_store:
                service: Chill\MainBundle\Workflow\EntityWorkflowMarkingStore
```
2024-07-02 08:30:28 +02:00
06dd7dd4f5
apply rector rules 2024-05-28 14:58:09 +02:00
73d6578a3a
Fix workflow configuration 2024-04-29 15:28:24 +02:00
5be85a4fc6
Refactored code to use PHP8 attributes instead of annotations
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
2024-04-08 12:11:29 +02:00
0ff4593863
Apply rector rules: add annotation for doctrine mapping 2024-04-05 13:11:42 +02:00
72016e1a21
Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:01:30 +02:00
579bd829f8
Apply rector rules: symfony up to 54 2024-04-04 23:30:25 +02:00
bc2041cbdd
apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
075aca493b
DX: type-hing oneToMany and ManyToMany properties as collection 2023-07-19 16:21:17 +02:00
dde3002100
DX: apply rector rules up to php8.0 2023-04-28 22:30:33 +02:00
a21637331f
Fixed: [workflow] validation of users in cc and dest
The validation is processed at the form step, so before the transition is processed
2023-04-13 12:24:44 +02:00
nobohan
2b3d7f34fc Feature: Add new field ccuser in workflow step form 2023-03-29 11:19:51 +02:00
eaea702454 FIX add initial user as suggestion and fix error when there are no suggestions 2023-03-15 10:14:25 +01:00
67e68ac149 FIX [review] processing review, but stuck at transformation of json string to array 2023-03-15 09:37:56 +01:00
4c7a16587b [workflow][method] add method to get involved/suggested users 2023-03-15 09:37:56 +01:00
9699e2304a fix cs: declare type and license header mismatch 2022-10-06 22:25:43 +02:00
67c3f3a840 fix cs with licencse header 2022-10-05 17:08:14 +02:00
1479e2ae9a entity workflow: handle sending an access key by email 2022-02-24 21:53:05 +01:00
45beb27f83 fix sending notifications 2022-02-16 21:54:37 +01:00
93345c09a1 fix cs 2022-02-11 13:45:21 +01:00
199a441593 fix tests for EntityWorkflow 2022-02-11 13:24:29 +01:00
a612d7dd9f improve workflow decision form 2022-02-01 12:19:51 +01:00
86e7b0f007 rewrite workflow and handle finalize differently 2022-01-29 00:20:35 +01:00
fdafe7c82b normalizer for entityworkflow 2022-01-29 00:20:35 +01:00
0378df42b6 fix cs 2022-01-27 17:08:00 +01:00
88d1fe24b4 Creation of PersonResource 2022-01-26 12:52:15 +00:00
Pol Dellaiera
7513187a6d
Revert "fix cs"
This reverts commit 7b3e9cb490a1ea37d0900d7f087e06367d2d215f.
2022-01-25 15:54:20 +01:00