From 1a7653609e432e1a07dd40cb322752918d9614c0 Mon Sep 17 00:00:00 2001 From: Hai Phuc Nguyen Date: Tue, 10 Dec 2024 23:59:59 -0800 Subject: [PATCH] Update --- .../teams/web/rest/WorkflowController.java | 10 ++--- .../main/resources/config/application-dev.yml | 1 - ...logback-spring1.xml => logback-spring.xml} | 41 ------------------- .../master/changelog/001_initial_schema.xml | 5 +-- .../tenant/changelog/000_initial_schema.xml | 28 +++++-------- .../changelog/001_request_workflow_tables.xml | 24 +++++++---- 6 files changed, 32 insertions(+), 77 deletions(-) rename server/src/main/resources/{logback-spring1.xml => logback-spring.xml} (56%) diff --git a/server/src/main/java/io/flexwork/modules/teams/web/rest/WorkflowController.java b/server/src/main/java/io/flexwork/modules/teams/web/rest/WorkflowController.java index 5a383b11..28c18cc1 100644 --- a/server/src/main/java/io/flexwork/modules/teams/web/rest/WorkflowController.java +++ b/server/src/main/java/io/flexwork/modules/teams/web/rest/WorkflowController.java @@ -100,7 +100,7 @@ public ResponseEntity> getWorkflowsByTeam(@PathVariable Long t */ @GetMapping("/teams/{teamId}/global-workflows-not-linked-yet") public ResponseEntity> getGlobalWorkflowsNotLinkedToTeam( - @RequestParam Long teamId) { + @PathVariable Long teamId) { List workflows = workflowService.listGlobalWorkflowsNotLinkedToTeam(teamId); return ResponseEntity.ok(workflows); } @@ -156,10 +156,10 @@ public ResponseEntity updateWorkflow( return ResponseEntity.ok(updatedWorkflow); } - @PostMapping("/create-workflow-reference") + @PostMapping("/{referencedWorkflowId}/teams/{teamId}/create-workflow-reference") public ResponseEntity createWorkflowByReference( @PathVariable Long teamId, - @RequestParam Long referencedWorkflowId, + @PathVariable Long referencedWorkflowId, @RequestBody WorkflowDTO workflowDTO) { WorkflowDetailedDTO createdWorkflow = workflowService.createWorkflowByReference( @@ -167,10 +167,10 @@ public ResponseEntity createWorkflowByReference( return ResponseEntity.status(HttpStatus.CREATED).body(createdWorkflow); } - @PostMapping("/create-workflow-clone") + @PostMapping("/{workflowToCloneId}/teams/{teamId}/create-workflow-clone") public ResponseEntity createWorkflowByCloning( @PathVariable Long teamId, - @RequestParam Long workflowToCloneId, + @PathVariable Long workflowToCloneId, @RequestBody WorkflowDTO workflowDTO) { WorkflowDetailedDTO clonedWorkflow = workflowService.createWorkflowByCloning(teamId, workflowToCloneId, workflowDTO); diff --git a/server/src/main/resources/config/application-dev.yml b/server/src/main/resources/config/application-dev.yml index 6cb96b7e..021e8480 100644 --- a/server/src/main/resources/config/application-dev.yml +++ b/server/src/main/resources/config/application-dev.yml @@ -6,7 +6,6 @@ logging: - structured.format.console: logstash level: ROOT: WARN sql: DEBUG # built-in group sql include org.springframework.jdbc.core, org.hibernate.SQL diff --git a/server/src/main/resources/logback-spring1.xml b/server/src/main/resources/logback-spring.xml similarity index 56% rename from server/src/main/resources/logback-spring1.xml rename to server/src/main/resources/logback-spring.xml index 82c392c1..800e21c8 100644 --- a/server/src/main/resources/logback-spring1.xml +++ b/server/src/main/resources/logback-spring.xml @@ -40,47 +40,6 @@ resource="org/springframework/boot/logging/logback/console-appender.xml" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/liquibase/src/main/resources/config/liquibase/master/changelog/001_initial_schema.xml b/tools/liquibase/src/main/resources/config/liquibase/master/changelog/001_initial_schema.xml index 88d68eeb..308a5e9c 100644 --- a/tools/liquibase/src/main/resources/config/liquibase/master/changelog/001_initial_schema.xml +++ b/tools/liquibase/src/main/resources/config/liquibase/master/changelog/001_initial_schema.xml @@ -17,7 +17,7 @@ author="flexapp"> - + @@ -38,9 +38,6 @@ - - diff --git a/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/000_initial_schema.xml b/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/000_initial_schema.xml index adb0cd2f..8939c92b 100644 --- a/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/000_initial_schema.xml +++ b/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/000_initial_schema.xml @@ -7,8 +7,6 @@ - @@ -27,7 +25,7 @@ - + @@ -76,9 +74,6 @@ - - @@ -149,7 +144,7 @@ - + @@ -159,9 +154,6 @@ - - @@ -171,7 +163,7 @@ - + @@ -180,9 +172,6 @@ - - - + @@ -243,7 +232,7 @@ referencedColumnNames="id" /> - + @@ -262,7 +251,7 @@ - + @@ -340,6 +329,7 @@ + SELECT setval('fw_user_id_seq', (SELECT MAX(id) FROM fw_user)); @@ -359,12 +349,13 @@ + SELECT setval('fw_organization_id_seq', (SELECT MAX(id) FROM + fw_organization)); - @@ -372,6 +363,7 @@ + SELECT setval('fw_team_id_seq', (SELECT MAX(id) FROM fw_team)); diff --git a/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/001_request_workflow_tables.xml b/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/001_request_workflow_tables.xml index b5772938..789213ba 100644 --- a/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/001_request_workflow_tables.xml +++ b/tools/liquibase/src/main/resources/config/liquibase/tenant/changelog/001_request_workflow_tables.xml @@ -9,7 +9,7 @@ - + @@ -93,7 +93,7 @@ constraintName="fk_workflow_last_modified_by_user" /> - + @@ -117,7 +117,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -218,7 +218,7 @@ the event name that triggers each transition, along with the SLA duration for each transition. --> - + @@ -260,7 +260,7 @@ - + @@ -280,7 +280,7 @@ - + @@ -325,7 +325,7 @@ - + @@ -361,6 +361,8 @@ + SELECT setval('fw_workflow_id_seq', (SELECT MAX(id) FROM + fw_workflow)); @@ -374,6 +376,8 @@ + SELECT setval('fw_workflow_state_id_seq', (SELECT MAX(id) FROM + fw_workflow_state)); @@ -388,6 +392,8 @@ + SELECT setval('fw_workflow_transition_id_seq', (SELECT MAX(id) + FROM fw_workflow_transition)); @@ -399,5 +405,7 @@ + SELECT setval('fw_team_workflow_selection_id_seq', (SELECT + MAX(id) FROM fw_team_workflow_selection)); \ No newline at end of file