Closed nfmohit closed 1 week ago
Hi @nfmohit, the IB and linked PR looks good. However, can we add some test coverage for this? Maybe add a test_get_data_publications
or similar to test that the get_publication_filter
function works correctly.
Hi @nfmohit, the IB and linked PR looks good. However, can we add some test coverage for this? Maybe add a
test_get_data_publications
or similar to test that theget_publication_filter
function works correctly.
@kuasha420 Good call! I've updated the test coverage to include testing for the filter. I've also bumped up the estimate accordingly. Thanks!
Thanks @nfmohit !
IB :white_check_mark:
@ankitrox , I tried to test this but it seems like it's still pulling all my Publishings when I should only have one for this site. Could you help to double check if the fixes are working as expected on your end.
Hi @kelvinballoo. Thank you for sharing your observation.
I just tested and I can confirm that the fix is working as expected. In your screenshot, I can see that you're testing the develop
branch. However, the PR was originally merged to the main
branch. The changes were also merged back to the develop
branch, but looking at Git history, I can see that it was potentially done "after" your testing.
Could you give this a try again now that the change exists in the develop
(or main
) branch?
Thank you!
Thanks @nfmohit , indeed it was due to the testing being on develop and the fix was on main.
Reviewed this on develop today after the merge and it's working as expected. Moving ticket to approval.
When there is a new site with no publication, the module will prompt for creating publication. It won't pull all the publications under that accounted. And once publication was created, the dashboard will reload and prompt to complete setup. ✅
Going back to the setup and clicking edit will load the only one Publication that was linked to this URL, and not all publications linked to the account. ✅
Created a 2nd publication and when disconnected and reconnected the RRM module, both publications would appear as expected. ✅
Bug Description
It appears that due to the change introduced here, the RRM
GET:publications
endpoint is no longer filtering the publications based on the current site URL.Reported during bug bash here.
Steps to reproduce
rrmModule
feature flag from the tester plugin.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
GET:publications
endpoint should correctly filter publications relevant to the current site only, based on the criteria mentioned in the ACs of #8791, also quoted below:Implementation Brief
includes/Modules/Reader_Revenue_Manager.php
:get_publication_filter
method:URL::permute_site_url
method invocation, instead of passing the raw URL, pass the actual URL which includes the URL schema.Test Coverage
tests/phpunit/integration/Modules/Reader_Revenue_ManagerTest.php
:test_get_publications
test case:filter
query parameter is set appropriately in the request URL.QA Brief
Steps to reproduce
section.Changelog entry