[STT-1622] Embargo and Schedule info lost when doing the "Copy and send to Desk" action#3150
Merged
BrianMwangi21 merged 2 commits intosuperdesk:developfrom Feb 19, 2026
Merged
Conversation
… to desk When using 'Send and Duplicate' action, the copied item was losing embargo, publish_schedule, and schedule_settings fields. This fix ensures these fields are preserved when duplicating to a desk. Changes: - Updated DuplicateService.create_async() to pass extra_fields parameter with EMBARGO, PUBLISH_SCHEDULE, and SCHEDULE_SETTINGS when target is a desk - Uses constants instead of string literals (following existing patterns) - Personal space duplication remains unchanged (fields still removed) - Updated test expectation in content_duplication.feature References: https://sofab.atlassian.net/browse/STT-185
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses STT-1622 by allowing the archive duplication endpoint (used by “Send and Duplicate / Copy and send to Desk”) to optionally preserve scheduling-related fields that are normally stripped during duplication.
Changes:
- Added an optional request flag (
preserve_embargo_and_schedule) to/archive/<guid>/duplicateto keepembargo,publish_schedule, andschedule_settingswhen duplicating to a desk. - Updated the duplication service to pass
extra_fieldsintoarchive_service.duplicate_content(...)when the flag is set. - Added a feature scenario covering preservation behavior (currently only asserts embargo + publish_schedule).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| features/content_duplication.feature | Adds a new duplication scenario intended to verify schedule/embargo preservation via the new request flag. |
| apps/duplication/archive_duplication.py | Introduces the new request flag and conditionally preserves embargo/schedule fields during desk duplication. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…cate API Add support for preserving embargo and schedule fields when duplicating via a request parameter. When preserve_embargo_and_schedule is set to true in the duplicate request, the fields embargo, publish_schedule, and schedule_settings will be preserved on the duplicated item. Changes: - Added preserve_embargo_and_schedule field to DuplicateResource schema - Updated DuplicateService.create_async() to check the request parameter - Added test scenario for the new functionality
c66af69 to
29e5bb1
Compare
petrjasek
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR ensures that embargo, publish_schedule, and schedule_settings fields are preserved when duplicating content to a desk in the "Send and Duplicate" flow. This is implemented via a client-side configuration flag that only affects the Send and Duplicate action, leaving regular duplication flows unchanged.
What has changed
DuplicateService.create_async()to conditionally preserve fields when the flag is setSteps to test
sendAndDuplicate.preserveEmbargoAndSchedule: truein superdesk.config.js like for STTNote: This PR is related to this PR in superdesk-stt, and PR in superdesk-client-core
Resolves: STT-1622