-
Notifications
You must be signed in to change notification settings - Fork 306
Reset RRM module settings when publication ID is changed #9953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note for AC reviewerThe AC has been updated to reset only the We have largely two types of module settings in Reader Revenue Manager:
We do not want to reset the user preference module settings because they may still be relevant after changing the publication. We also do not want to reset the publication information because they are set automatically when the user selects a publication, thanks to the The only outliers are:
Thanks! |
Hi @nfmohit, thanks for drafting the AC, as well as the clarifying note. I'd suggest the AC could be a bit more specific about what's meant by the connected publication being changed. Technically a publication is only really "connected" when the new We could flesh this out in the IB, but it feels like more of a requirement than an implementation detail and it would help the IB author to include this in the AC. |
@techanvil As discussed, I've updated the AC according to your feedback. While I was at it, I also added an IB, which, if you think looks good, this can be moved directly to EB. Thank you! |
Thanks @nfmohit! Sorry, though - I should have phrased my previous suggestion like so:
I.e. maybe we do still want to do a server-side reset in the change handler too. Maybe not - it depends if we expect the publication ID to change via a route other than updating it via the |
Thank you @techanvil. I did think about that and at this point, I don't think the publication would change without the help of |
Thanks @nfmohit, good to know! In that case, these AC LGTM. AC ✅ |
Thanks @nfmohit, this IB LGTM. I did make a small tweak to remove the "towards the end" specification for appending IB ✅ |
QA Update ✅
|
Feature Description
When the RRM publication is changed, all the module setting values should be reset to their defaults.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
publicationOnboardingStateChanged
productID
(only if therrmModuleV2
feature flag is enabled)Implementation Brief
assets/js/modules/reader-revenue-manager/datastore/publications.js
:selectPublication
action:settings
object when defined to include apublicationOnboardingStateChanged
property with valuefalse
.rrmModuleV2
feature flag, append aproductID
property to thesettings
object with a value ofopenaccess
.Test Coverage
assets/js/modules/reader-revenue-manager/datastore/publications.test.js
:selectPublication
to cover the above changes.QA Brief
Note: Make sure that you have two publications available for the site in publisher center, else create two.
Install the cron manager plugin. Enable the
rrrmModuleV2
flag.In test plugin settings, "Reader Revenue Manager > Force Reader Revenue Manager publication onboarding state", set this to
ONBOARDING_ACTION_REQUIRED
.Setup RRM and connect to the publication which has status
ONBOARDING_COMPLETE
.In test plugin settings, "Reader Revenue Manager > Force Reader Revenue Manager publication onboarding state", set this to
No onboarding state enforced (default)
.Go to Tools > Cron manager, execute the cron
googlesitekit_cron_synchronize_publication
.Go to Site Kit > Settings > Reader Revenue Manager, click "Edit".
Run the following command in broweser console.
It should give output like (but not same):
publicationOnboardingStateChanged
should befalse
andproductID
should beopenaccess
.Changelog entry
The text was updated successfully, but these errors were encountered: