[PR #1852] [MERGED] fix: duplicate fields and recipients when you duplicate a document #1887

Closed
opened 2026-02-26 20:31:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1852
Author: @ephraimduncan
Created: 6/20/2025
Status: Merged
Merged: 6/23/2025
Merged by: @dguyen

Base: mainHead: fix/duplicate-document-template


📝 Commits (4)

  • c6f3a2f fix: duplicate fields and recipients when you duplicate a document
  • b170907 chore: remove redundant query
  • 94b684a fix: more duplicated settings
  • aea4241 fix: cleanup

📊 Changes

2 files changed (+112 additions, -75 deletions)

View changed files

📝 packages/lib/server-only/document/duplicate-document-by-id.ts (+72 -41)
📝 packages/lib/server-only/template/duplicate-template.ts (+40 -34)

📄 Description

Description

Previously, duplicating documents created empty shells without fields or recipients, and template duplication lost all advanced field configurations. These changes implement proper deep cloning to create true functional copies.

Changes Made

  • Create new recipients and fields for the new duplicated document
  • Added fieldMeta property to field creation in template duplication to preserve advanced settings

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1852 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 6/20/2025 **Status:** ✅ Merged **Merged:** 6/23/2025 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/duplicate-document-template` --- ### 📝 Commits (4) - [`c6f3a2f`](https://github.com/documenso/documenso/commit/c6f3a2faa87750e3013bdd4e093852be1cd86de6) fix: duplicate fields and recipients when you duplicate a document - [`b170907`](https://github.com/documenso/documenso/commit/b170907709bdda4d2540af7eb48126cf50078ee9) chore: remove redundant query - [`94b684a`](https://github.com/documenso/documenso/commit/94b684a3ee7b5e0023db2f13a6d0dde443bba22c) fix: more duplicated settings - [`aea4241`](https://github.com/documenso/documenso/commit/aea42412954b08f5c93b98d1cd49fb34335e943b) fix: cleanup ### 📊 Changes **2 files changed** (+112 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `packages/lib/server-only/document/duplicate-document-by-id.ts` (+72 -41) 📝 `packages/lib/server-only/template/duplicate-template.ts` (+40 -34) </details> ### 📄 Description ## Description Previously, duplicating documents created empty shells without fields or recipients, and template duplication lost all advanced field configurations. These changes implement proper deep cloning to create true functional copies. ## Changes Made - Create new recipients and fields for the new duplicated document - Added `fieldMeta` property to field creation in template duplication to preserve advanced settings --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:31:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1887
No description provided.