Skip to content

fix(api-service): Workflow schema duplication fixes NV-7040#9830

Merged
scopsy merged 1 commit intonextfrom
cursor/NV-7040-workflow-schema-duplication-bcbe
Jan 14, 2026
Merged

fix(api-service): Workflow schema duplication fixes NV-7040#9830
scopsy merged 1 commit intonextfrom
cursor/NV-7040-workflow-schema-duplication-bcbe

Conversation

@scopsy
Copy link
Contributor

@scopsy scopsy commented Jan 14, 2026

What changed? Why was the change needed?

This PR resolves NV-7040, where the workflow schema (payloadSchema, validatePayload, and severity) was not being duplicated when a workflow was copied.

The duplicate-workflow.usecase.ts has been updated to include these missing fields during the duplication process. A new e2e test case has also been added to workflow.controller.e2e.ts to ensure the correct duplication of these properties.

Screenshots

N/A

Expand for optional sections

Related enterprise PR

N/A

Special notes for your reviewer

The approach for duplicating these fields aligns with the existing logic in sync-to-environment.usecase.ts.


Linear Issue: NV-7040

Open in Cursor Open in Web

… duplicating workflow

The workflow duplication usecase was missing the payloadSchema, validatePayload,
and severity fields when building the duplicate workflow DTO. This caused the
duplicated workflow to lose these important configuration settings.

Fixes NV-7040

Co-authored-by: dima <dima@novu.co>
@cursor
Copy link
Contributor

cursor bot commented Jan 14, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@linear
Copy link

linear bot commented Jan 14, 2026

@netlify
Copy link

netlify bot commented Jan 14, 2026

Deploy Preview for dashboard-v2-novu-staging canceled.

Name Link
🔨 Latest commit 250040d
🔍 Latest deploy log https://app.netlify.com/projects/dashboard-v2-novu-staging/deploys/696738e352cad20008216622

@scopsy scopsy changed the title Workflow schema duplication fix(api-service): Workflow schema duplication Jan 14, 2026
@scopsy scopsy marked this pull request as ready for review January 14, 2026 06:36
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

This pull request extends the workflow duplication feature to preserve three additional fields when duplicating workflows. The DuplicateWorkflowUseCase now copies payloadSchema, validatePayload, and severity from the origin workflow to the duplicated workflow, with payloadSchema defaulting to null if not present. Corresponding end-to-end tests are included to verify these fields are correctly preserved during the duplication process.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description provides relevant context about the change, references the resolved issue, explains what was fixed, and describes the implementation approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing workflow schema duplication during workflow copying, with the referenced issue ticket NV-7040.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@scopsy scopsy changed the title fix(api-service): Workflow schema duplication fix(api-service): Workflow schema duplication fixes NV-7040 Jan 14, 2026
@scopsy scopsy merged commit 69a78a3 into next Jan 14, 2026
31 of 32 checks passed
@scopsy scopsy deleted the cursor/NV-7040-workflow-schema-duplication-bcbe branch January 14, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants