Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a follow up on hierarchical facets, more precisely the "Enable parent" feature.
At the moment the parent is selected as soon as one of the childs is unselected.
The expected behavior could be to only select the parent when all of the childs are unselected.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2930958.patch | 2.49 KB | borisson_ |
#4 | 2930958-test-only.patch | 1.16 KB | borisson_ |
Comments
Comment #2
borisson_To test this, we should add a new test to the
HierarchicalFacetIntegrationTest
, that test can copy a lot of what is inverifyEnableParentWhenChildGetsDisabledOption
Comment #3
mpp CreditAttribution: mpp as a volunteer and at AmeXio commentedBefore enabling the parent id again, added a check if there are active siblings.
Note that this is quite expensive code, it loops over all results, gets all children and then loops over all results again..
It would be good to have a more performant getSiblings() method or only loop.
I'm aware this still needs test but already marking it for needs review to see if it breaks any other test.
Comment #4
borisson_Test only is also interdiff.
Comment #6
borisson_Committed and pushed, thanks!