2957 Commits

Author SHA1 Message Date
38886cd0b6 Rector correction in NotificationOnTransition 2024-11-20 10:23:33 +01:00
875d3293d2 Workflow: set comment on previous step 2024-11-20 09:47:11 +01:00
128f8b8852
Fix normalization of Date: use the same timezone as the original date 2024-11-19 15:40:53 +01:00
6ca4b91e1e
Refactor breadcrumb macro parameters in Workflow templates
Updated the breadcrumb macro's parameters to accept `entity_workflow` directly instead of a context object. This change affects the index, list, and macro_breadcrumb templates, ensuring consistent parameter usage and improving readability.

This avoid exploiting a bug which was solved in twig 3.15.0
2024-11-19 12:58:20 +01:00
3a1947df9e
Add entity workflow title to notification
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.
2024-11-19 12:01:31 +01:00
04b2def8a5 Save the comments on a workflow step 2024-11-19 10:15:15 +00:00
9a44cf060f
Add workflow title to notification emails for workflow transition, to user groups
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.
2024-11-18 15:05:03 +01:00
aa0785fc71 Apply prettier rules 2024-11-14 18:47:38 +01:00
0454e5d758 eslint corrections in mainbundle 2024-11-14 16:46:07 +01:00
b7e27536bd
Merge remote-tracking branch 'origin/master' into signature-app-master 2024-11-14 12:18:07 +01:00
829fb669fe
Update Workflow Permission Handling
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.
2024-11-14 12:07:21 +01:00
903a87c589
Merge branch '323-related-entity-permission-give-from-workflow' into signature-app-master 2024-11-13 22:44:29 +01:00
c99dda0126
Rename WorkflowStoredObjectPermissionHelper to WorkflowRelatedEntityPermissionHelper and create method isAllowedByWorkflow
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.
2024-11-13 22:41:23 +01:00
5ad11041e0
Add line splitting in user render string functionality
Introduce a new option to split lines in user job and scope render strings based on a specified character limit. Implement a corresponding test to verify the correct behavior of this feature.
2024-11-13 17:54:58 +01:00
ba2d8663f1
Add line splitting in user render string functionality
Introduce a new option to split lines in user job and scope render strings based on a specified character limit. Implement a corresponding test to verify the correct behavior of this feature.
2024-11-13 17:54:20 +01:00
d6c55c830b
Persist EntityWorkflow and its steps with EntityManager
Refactored NotificationToUserGroupsOnTransition to utilize EntityManager for persisting EntityWorkflowStep. This ensures entities have generated IDs, leading to proper email notifications during workflow transitions.
2024-11-13 12:40:53 +01:00
21ec3121ec Merge branch 'signature-app-master' into 'master'
Signature app master

Closes #307

See merge request Chill-Projet/chill-bundles!743
2024-11-12 20:30:00 +00:00
6453237340
Mark class as final and readonly 2024-11-12 21:22:51 +01:00
79621e8ab7
Add guard to block signatures on related entities without objects
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.
2024-11-12 18:14:30 +01:00
bfa58177e0
fix url for granting access to workflow by key 2024-11-12 17:48:44 +01:00
ddf73e1a48
Updated URL in French workflow notification template
The absolute url in the French version of the workflow notification content to user group has been updated. It now points to 'chill_main_workflow_grant_access_by_key' instead of 'chill_main_workflow_show'. This update improves the user experience by taking the user directly to the desired page.
2024-11-12 14:52:39 +01:00
c3cc6c8353
Do not fail displaying notification when workflow has been deleted 2024-11-12 13:57:48 +01: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
0439c29305
Prevent workflow execution for finalized transitions
Added a check in the workflow-show page script to stop the execution if a transition is marked as finalized (`toFinal`). This ensures that transitions leading to final states are not processed further.
2024-11-07 21:52:44 +01:00
e5148f603b
Add TransitionHasSignerIfSignature validator
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.
2024-11-07 19:55:09 +01:00
db4d7669f1
Add duplication feature for evaluation documents within generic doc
Introduced a new method to duplicate evaluation documents and forward return path URLs. Updated templates to include duplication buttons and adjusted routing for handling the duplication process.
2024-11-06 19:34:41 +01:00
ac353ec3bc
fix cs 2024-11-06 17:10:53 +01:00
7aca08c89e
Allow to remove the canceled workflow to be deleted, if canceled
- OP#812
- https://champs-libres.openproject.com/work_packages/812
2024-11-06 17:10:48 +01:00
8cb2bb1ef4 Fix rector pipeline 2024-11-05 14:52:28 +01:00
973ffcbffa Fix text color and background color of footer, was being overwritten 2024-11-05 14:39:09 +01:00
8c3de682d6 Change color of footer text to dark 2024-11-05 14:30:26 +01:00
f05c25853c Fix of errors: automatic and some manual 2024-11-04 19:56:03 +01:00
43b70fd773
Rename translation key for workflow signature titles
Updated the translation key from 'workflow.signature_required_title' to 'workflow.signatures_title' in the workflow history view. This change ensures consistency and proper usage of the translation key across different parts of the application.
2024-11-04 15:26:07 +01:00
5c0a383909
Add null check to canRun method in CancelStaleWorkflowCronJob
Ensure the canRun method in CancelStaleWorkflowCronJob returns true when the cron job execution is null. This change includes updating the corresponding test case to cover the new behavior.
2024-11-04 14:16:52 +01:00
4dc2348893
Change behaviour to allow to add a new workflow (if available) and open the modal to list existing workflows in the same button
Use the feature of splitted dropdown buttons, from bootstrap.

See:
- OP#776
- https://champs-libres.openproject.com/work_packages/776
2024-11-04 14:05:57 +01:00
27ecae4486 first eslint corrections 2024-10-31 17:28:02 +01:00
32459e6092 Fix gender translation for unknown 2024-10-31 14:14:37 +01:00
64f3b40694 Add the possibility of unknown to the gender entity 2024-10-31 12:10:35 +01:00
80940a7b19 LoadGenders fixture access string value of enum 2024-10-29 16:51:14 +01:00
7541238c1e Fix pipeline for LoadGenders file 2024-10-29 16:09:04 +01:00
34748dca76 Create a gender fixture 2024-10-29 15:55:25 +01:00
989fdad561
Add chill_path_force_return_path method to routing helper
Implemented a new Twig function `chill_path_force_return_path` to enforce a specific return path within the URL. Updated relevant template to utilize this new function for better control over URL routing and return path management.

OP#787
https://champs-libres.openproject.com/work_packages/787
2024-10-25 18:33:22 +02:00
182e2fc3af
Set 'required' to false for Email field in UserGroupType form.
Changed the Email field's 'required' option to false, allowing it to be optional. This adjustment aims to improve the usability and flexibility of the UserGroupType form.
2024-10-25 11:18:38 +02:00
f750cfecac
Show userGroup in workflow breadcrumb
related:

- https://champs-libres.openproject.com/wp/774
- OP#774
- Vendee/accent-suivi-developpement#1274
2024-10-24 16:15:49 +02:00
bf85e9bb71
When a user applies a signature in a workflow, the signer is the futureDestUser of the next step
See:
- Vendee/accent-suivi-developpement#1252
- https://champs-libres.openproject.com/wp/768
- OP#768
2024-10-24 15:49:59 +02:00
fd69568842
Add workflow guard to block external send without public view
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.
2024-10-23 15:26:25 +02:00
a256307b82
Fix the triggering of the event goToGenerateWorkflow when relatedEntityId is not known
The component PickWorkflow emitted the event "goToGenerateWorkflow" when the normal behaviour is intercepted. But that event generated the link to create the workflow to pass it in the payload's event. That generation failed, causing the whole event to fail.

Now, if the link could not been generated, the link is a blank string. There is a supplementary parameter `isLinkValid`, boolean, inform if the link is valid or not.
2024-10-23 13:44:31 +02:00
19eb6f7ebb
Add suggested persons and third parties in form
Integrated suggested persons and third parties into the WorkflowStepType form. This enhancement auto-populates suggestion fields for better user experience. It ensures that the suggestion data for persons and third parties is readily available in the form configuration.
2024-10-23 11:41:20 +02:00
261bc88b5e
Add suggested persons and third parties methods
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.
2024-10-23 11:41:19 +02:00
968835a262
Refactor user suggestion logic in workflow
Removed duplicate user suggestion handling from `WorkflowController` and centralized it in `WorkflowStepType`. This change simplifies the controller and makes user suggestion logic more maintainable.
2024-10-22 23:51:48 +02:00