-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Labels
Module: RRMReader Revenue Manager module related issuesReader Revenue Manager module related issuesP0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature
Description
Feature Description
The rrmPolicyViolations feature flag should be removed and all feature-flagged code should be made unconditional to launch the RRM Policy Violations feature.
- Related: Add
rrmPolicyViolationsfeature flag #11999 (AddrrmPolicyViolationsfeature flag) - Design doc: RRM Policy Banners Design
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The
rrmPolicyViolationsfeature flag is removed from the codebase. - All feature-flagged code is made unconditional — the RRM policy violation functionality (notifications, settings, synchronization, debug fields, and module status) is always active.
- No references to the
rrmPolicyViolationsfeature flag remain in any source or test files. - All existing tests continue to pass, and tests are updated to remove feature flag enabling/disabling where applicable.
- Storybook stories no longer specify
rrmPolicyViolationsin theirfeaturesparameter.
Implementation Brief
- In
feature-flags.json:- Remove
rrmPolicyViolationsfrom the feature flags array.
- Remove
PHP changes
- In
includes/Modules/Reader_Revenue_Manager/Settings.php:- Remove the
Feature_Flags::enabled( 'rrmPolicyViolations' )check inget_default()and always includecontentPolicyStatusin the defaults. - Remove the
Feature_Flags::enabled( 'rrmPolicyViolations' )check inget_sanitize_callback()and always sanitizecontentPolicyStatus.
- Remove the
- In
includes/Modules/Reader_Revenue_Manager/Synchronize_Publication.php:- Remove the
Feature_Flags::enabled( 'rrmPolicyViolations' )check insynchronize_publication_data()and always synchronizecontentPolicyStatus.
- Remove the
- In
includes/Modules/Reader_Revenue_Manager.php:- Remove the
Feature_Flags::enabled( 'rrmPolicyViolations' )check inregister()and always clear dismissed policy violation notifications on publication change. - Remove the
Feature_Flags::enabled( 'rrmPolicyViolations' )check inget_debug_fields()and always include the content policy state debug field.
- Remove the
JavaScript changes
- In
assets/js/modules/reader-revenue-manager/index.js:- Remove the feature flag condition around the
SettingsStatusComponentregistration and always register it. - Remove the
featureFlag: 'rrmPolicyViolations'property from both policy violation notification definitions in theNOTIFICATIONSarray.
- Remove the feature flag condition around the
- In
assets/js/modules/reader-revenue-manager/datastore/settings.js:- Remove the feature flag check in
validateCanSubmitChanges()and always validatecontentPolicyStatus.
- Remove the feature flag check in
- In
assets/js/modules/reader-revenue-manager/datastore/publications.js:- Remove the feature flag check in the
selectPublicationaction and always setcontentPolicyStatus.
- Remove the feature flag check in the
- In
assets/js/modules/reader-revenue-manager/datastore/base.js:- Remove the feature flag condition and always include
'contentPolicyStatus'in thesettingSlugsarray.
- Remove the feature flag condition and always include
- In
assets/js/modules/reader-revenue-manager/components/settings/SettingsForm.js:- Remove the
useFeature( 'rrmPolicyViolations' )hook usage and always render thePolicyViolationSettingsNoticecomponent.
- Remove the
- In
assets/js/modules/reader-revenue-manager/components/settings/SettingsView.js:- Remove the
useFeature( 'rrmPolicyViolations' )hook usage and always render thePolicyViolationSettingsNoticecomponent.
- Remove the
Storybook updates
- In
assets/js/modules/reader-revenue-manager/components/settings/SettingsView.stories.js:- Remove
features: [ 'rrmPolicyViolations' ]from theWithPolicyViolationPending,WithPolicyViolationActive, andWithPolicyViolationExtremestories.
- Remove
- In
assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.stories.js:- Remove
features: [ 'rrmPolicyViolations' ]from theWithPolicyViolationPending,WithPolicyViolationActive, andWithPolicyViolationExtremestories.
- Remove
- In
assets/js/components/settings/SettingsActiveModules.stories.js:- Remove
features: [ 'rrmPolicyViolations' ]from theWithRRMActionNeededstory.
- Remove
- Update visual regression reference images as needed.
Test Coverage
- In
tests/phpunit/integration/Modules/Reader_Revenue_Manager/SettingsTest.php:- Remove the
enable_feature( 'rrmPolicyViolations' )calls and merge the feature-flag-specific test cases into the main test cases.
- Remove the
- In
tests/phpunit/integration/Modules/Reader_Revenue_ManagerTest.php:- Remove the
enable_feature( 'rrmPolicyViolations' )calls and make the policy-violation-related test cases unconditional.
- Remove the
- In
tests/phpunit/integration/Modules/Reader_Revenue_Manager/Synchronize_PublicationTest.php:- Remove the
enable_feature( 'rrmPolicyViolations' )call and make the synchronization test unconditional.
- Remove the
- In
assets/js/modules/reader-revenue-manager/datastore/settings.test.js:- Remove the feature flag enabling/disabling and update tests to always include
contentPolicyStatusbehavior.
- Remove the feature flag enabling/disabling and update tests to always include
- In
assets/js/modules/reader-revenue-manager/datastore/publications.test.js:- Remove the feature flag enabling and make
contentPolicyStatustests unconditional.
- Remove the feature flag enabling and make
QA Brief
- Verify that
rrmPolicyViolationsno longer appears in Tester plugin. - Connect RRM with a publication that has a policy violation. Without enabling any feature flags, verify:
- A policy violation notification banner appears on the dashboard (warning for pending/active, error for extreme).
- The Settings view and edit modes show the Policy Violation settings notice.
- The Connected Services list shows an "Action needed" badge for RRM.
- The Site Health debug info includes a "Content policy state" field.
- With a publication that has no policy violation, verify that none of the above notices/badges appear.
- Complete the full RRM setup flow and verify it succeeds without errors.
Changelog entry
- Remove the
rrmPolicyViolationsfeature flag.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Module: RRMReader Revenue Manager module related issuesReader Revenue Manager module related issuesP0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature