Skip to content

Comments

[STT-1622] Embargo and Schedule info lost when doing the "Copy and send to Desk" action#3150

Merged
BrianMwangi21 merged 2 commits intosuperdesk:developfrom
BrianMwangi21:STT-1622
Feb 19, 2026
Merged

[STT-1622] Embargo and Schedule info lost when doing the "Copy and send to Desk" action#3150
BrianMwangi21 merged 2 commits intosuperdesk:developfrom
BrianMwangi21:STT-1622

Conversation

@BrianMwangi21
Copy link
Contributor

@BrianMwangi21 BrianMwangi21 commented Feb 18, 2026

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

  • Modified DuplicateService.create_async() to conditionally preserve fields when the flag is set
  • Added test scenario

Steps to test

  1. Configure sendAndDuplicate.preserveEmbargoAndSchedule: true in superdesk.config.js like for STT
  2. Create a story on any desk and add embargo and publishing schedule dates
  3. Save the story
  4. Click the "Send and Duplicate" button (sends to the configured target desk, e.g., Deski)
  5. Verify the duplicated story in the target desk has the same:
    • Embargo date
    • Publishing schedule date
    • Schedule settings (timezone)
  6. Verify the original story retains its embargo and schedule information
  7. Test regular "Duplicate To" flow - fields should NOT be preserved

Note: This PR is related to this PR in superdesk-stt, and PR in superdesk-client-core

Resolves: STT-1622

… 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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>/duplicate to keep embargo, publish_schedule, and schedule_settings when duplicating to a desk.
  • Updated the duplication service to pass extra_fields into archive_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
@BrianMwangi21 BrianMwangi21 merged commit 8335250 into superdesk:develop Feb 19, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants