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

Grid view doesn't filter by an item from the classification store #5078

Closed
davi-mo opened this issue Oct 10, 2019 · 10 comments · Fixed by #5079

Comments

@davi-mo
Copy link
Contributor

commented Oct 10, 2019

Bug Report

Expected behavior

It should be possible to filter by items from the classification store.

Actual behavior

An exception is thrown when I am trying to filter by the item.
Screenshot 2019-10-09 at 12 25 18

Steps to reproduce

  1. Go to Data Objects
  2. Navigate to a folder that contains items in the grid view
  3. Click on grid options.
  4. Select an item from the classification store
  5. Click on apply
  6. Click on the column that contains the item from the classification store
  7. Select filters and choose an item
  8. See the popup with the exception

I could provide a PR for this issue.

@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

Unable to reproduce. Can you provide more details? PRs are always appreciated :-)

@davi-mo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 10, 2019

@weisswurstkanone PR is opened

@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

Thx! Why would it be an array? Which kind of datatype are you trying to filter?

@davi-mo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 10, 2019

Screenshot 2019-10-10 at 11 15 13

@weisswurstkanone weisswurstkanone self-assigned this Oct 10, 2019
@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

IMHO the right place for that would be Pimcore\Model\DataObject\ClassDefinition\Data\Multiselect::getFilterConditionExt

@davi-mo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 10, 2019

Hi @weisswurstkanone, why do you think that would be the right place? The problem is for this specific case, the method Pimcore\Model\DataObject\ClassDefinition\Data\Multiselect::getFilterConditionExt is not been called.

@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

I my case it was called.
I created a CS key of type multiselect.
Then added the key to the grid and enabled filtering.

@davi-mo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 10, 2019

Hi @weisswurstkanone, I discovered why is not been called. That's because I am using a type select and not multi-select. And in the select class, we don't have a method called getFilterConditionExt.
Screenshot 2019-10-10 at 14 57 28

@weisswurstkanone

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

Great :-) My assumption was that we are talking about a multiselect field.
So my suggestion would be to implement it for the datatype instead of relying on the fallback.

@davi-mo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 10, 2019

@weisswurstkanone Great. Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.