Skip to content

Conversation

@nytamin
Copy link
Member

@nytamin nytamin commented Aug 28, 2025

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a: BREAKING CHANGE to the blueprint-integration interface.

Current Behavior

Use case:

We (NRK) need to trigger a TSR Action from blueprints at the time a user does a "Reset Rundown".
The problem is that neither one of the blueprints onRundownActivate nor onRundownDeactivate hooks are called upon a "Reset Rundown".

New Behavior

This PR does two things:

  • Changes the algorithm for a "Reset Rundown" so that it always run activateRundownPlaylist (which does a reset internally)
  • Removes the argument wasActive from onRundownActivate?: (context: IRundownActivationContext, wasActive: boolean) => Promise<void> (this is a BREAKING CHANGE) and instead adds previousState and currentState to IRundownActivationContext

This allows our blueprints to trigger our TSR Action from onRundownActivate

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

This PR affects the blueprints-integration interface.
This PR potentially affects the Reset Rundown method.

Time Frame

We've merged this into our local R52 branch, we would like to get this merged into the in-development release.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

…rentState in RundownActivationContext. Also changed the algorithm in handleResetRundownPlaylist, so that activateRundownPlaylist always runs

This is to provide better context for blueprints, so that they can determine if a RundownPlaylist is being Activated from idle, from Rehersal or a Reset
@nytamin nytamin requested a review from a team as a code owner August 28, 2025 11:26
@nytamin nytamin requested a review from Julusian September 8, 2025 12:05
# Conflicts:
#	packages/job-worker/src/playout/activePlaylistActions.ts
#	packages/job-worker/src/playout/activePlaylistJobs.ts
#	packages/job-worker/src/playout/lib.ts
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 81.81818% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...es/job-worker/src/playout/activePlaylistActions.ts 48.38% 16 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@Julusian Julusian left a comment

Choose a reason for hiding this comment

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

There is a linter and unit test failure, both look to be quick fixes

@Julusian Julusian merged commit 007a9da into Sofie-Automation:release53 Sep 24, 2025
32 checks passed
@Julusian Julusian deleted the feat/onRundownActivate-reset branch September 24, 2025 14:36
jstarpl pushed a commit to nrkno/sofie-nrk-core that referenced this pull request Dec 12, 2025
…tomation#1514)

feat: replace `wasActive` in onRundownActivate with previousState&currentState in RundownActivationContext. Also changed the algorithm in handleResetRundownPlaylist, so that activateRundownPlaylist always runs

This is to provide better context for blueprints, so that they can determine if a RundownPlaylist is being Activated from idle, from Rehersal or a Reset
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.

3 participants