Skip to content
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

EZP-31779: Add missing language filter parameter in LocationSearchHitAdapter->getNbResult() #3053

Open
wants to merge 1 commit into
base: 6.13
Choose a base branch
from

Conversation

lionelakpagni
Copy link

Adding language filter parameter.
Forgotten here: 494b588

Question Answer
JIRA issue EZP-31779
Bug/Improvement yes
New feature no
Target version 6.x/7.x for bug fixes or improvements (on existing features), master for features
BC breaks yes/no
Tests pass yes/no
Doc needed no

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

Copy link
Contributor

@andrerom andrerom left a comment

Choose a reason for hiding this comment

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

+1, but you can use more expressive PR titles (and optionally commit messages), in this case maybe EZP-31779: Add missing language filtering in LocationSearchHitAdapter->getNbResult() breaking paging

Also should add test coverage for this, but for that maybe someone in Engineering can give you some hints, or maybe some in Support can help you on it. You can find some hints in #2940, but it's huge so search for adapter to see what is relevant, and in your case you should look for test class for location hit adapter to adapt instead.

@lionelakpagni lionelakpagni changed the title fix-EZP-31779 EZP-31779: Add missing language filter parameter in LocationSearchHitAdapter->getNbResult() Jul 29, 2020
@DominikaK DominikaK assigned DominikaK and unassigned DominikaK Jul 30, 2020
Copy link
Member

@adamwojs adamwojs left a comment

Choose a reason for hiding this comment

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

+1 but as @andrerom  said we should add test coverage for this. 

In \eZ\Publish\Core\Pagination\Tests\LocationSearchHitAdapterTest we need to check if \eZ\Publish\API\Repository\SearchService::findLocations has been invoked with $langaugeFilter. Exaclly the same as it was done in  \eZ\Publish\Core\Pagination\Tests\ContentSearchHitAdapterTest.

@ViniTou
Copy link
Contributor

ViniTou commented Jul 30, 2020

What is more, It also seams that those failing test on solr are related to this change:
https://travis-ci.org/github/ezsystems/ezpublish-kernel/jobs/712925198

it seems like the results are now in reversed order.
(not sure if somehow connected with this, #3029, @alongosz )

@lionelakpagni lionelakpagni requested review from adamwojs and removed request for DominikaK July 30, 2020 08:06
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

it seems like the results are now in reversed order.
(not sure if somehow connected with this, #3029, @alongosz )

It uses stable 1.5.8, while it should use 1.5.x-dev. I'm not sure why. Branch tests are passing, so somehow this PR affects that, but it doesn't make sense. Anyway, w/o passing tests and w/o mentioned additional test coverage I can't accept the PR. I can look into Solr version requirement myself, but this will take some time.

@pspanja
Copy link
Contributor

pspanja commented Jul 30, 2020

it seems like the results are now in reversed order.

Not reversed, but ordered lexicographically, so somehow connected to ID sort clause change. Probably the tests are not updated for this release.

See Jira: EZP-31779
Adding language filter parameter.
Forgotten here: 494b588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants