Skip to content

#2810: add refresh --recover to publish and start paused triggeredSends - #2811

Open
JoernBerkefeld wants to merge 1 commit into
developfrom
bug/2810-bug-refresh-triggeredsend-cannot-recover-items-left-paused-by-a-failed-publishstart
Open

JoernBerkefeld wants to merge 1 commit into
developfrom
bug/2810-bug-refresh-triggeredsend-cannot-recover-items-left-paused-by-a-failed-publishstart

Conversation

@JoernBerkefeld

Copy link
Copy Markdown
Contributor

PR details

What changes did you make? (Give an overview)

  • closes [BUG] refresh triggeredSend cannot recover items left paused by a failed publish/start #2810

  • New option mcdev refresh ... --recover: a triggeredSend left paused (Inactive) by a failed refresh is published and started again. The pause step is skipped because it is already paused. Active triggeredSends are refreshed as before; any other status is still skipped.

  • --recover requires keys or --like. A refresh of all triggeredSends with --recover is refused, because it would also start triggeredSends that were paused on purpose.

  • Added --like to the refresh command. The ticket asks for "keys or --like", but the strict CLI rejected --like on refresh so far.

  • When a paused triggeredSend is skipped without --recover, the error now points to --recover.

  • The start step's error now says failed to start instead of failed to publish, and it removes TriggeredSendStatus (not RefreshContent) after success.

  • Unchanged: journey refresh and asset deploy --refresh call TriggeredSend.refresh with checkKey=false or with active keys only, so they are not affected.

Further details (optional)

Tests (test/type.triggeredSend.test.js, new fixture retrieve-CustomerKey=testExisting_triggeredSend_paused-response.xml):

  • paused key without --recover → skipped, error, only the status retrieve is sent
  • paused key with --recover → refreshed with exactly two updates (publish, then start), no pause
  • active key with --recover → normal pause, publish, start
  • --recover without keys → refused, no API calls

Not tried live yet against a real business unit; will follow on this branch.

Wiki: refresh section in 06.b-~-Standard-Commands.md prepared locally (new --like and --recover paragraphs and examples); to be pushed after the release.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable)

- --recover skips the pause step for triggeredSends that are already Inactive, then publishes and starts them
- --recover requires keys or --like; refused for a refresh of all triggeredSends
- add --like to the refresh command (was rejected by the strict CLI)
- log "failed to start" instead of "failed to publish" when the start step fails
@JoernBerkefeld JoernBerkefeld added this to the 10.3.2 milestone Dec 5, 2026
@github-actions github-actions Bot added the bug Something isn't working label Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

Coverage Report

Commit:e29e283
Base: develop@3f91ed7

Type Base This PR
Total Statements Coverage  81.68%  81.69%  (+0.01%)
Total Branches Coverage  78.14%  78.19%  (+0.05%)
Total Functions Coverage  90.05%  90.05%  (+0%)
Total Lines Coverage  81.68%  81.69%  (+0.01%)
Details (changed files):
File Statements Branches Functions Lines
lib/cli.js  91.52%  96.66%  100%  91.52%
lib/index.js  73.5%  68.18%  86.53%  73.5%
lib/metadataTypes/TriggeredSend.js  80.88%  68.53%  100%  80.88%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant