[BUGFIX] Hierarchy facet items containing dashes cannot be unset #3696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you try to apply the hierarchy facet to a path of UUIDs instead of integers the facet can be selected, but not unselected anymore. This happens because the HierarchyFacetParser assumes that every value containing a dash is one that already contains the depth param. Which is not the case when dealing with uuids like /228d03bf-de44-4fcd-91fd-6ab05175fefc/901d43ca-28cf-4dbd-983d-ac96a0930530/a3f94d07-30fe-4ad1-a0cf-b5082db3aa94/.
This fix introduces a check that matches the value against the depth param pattern.
Replaces: #3070 by @tmaroschik
Todos:
Broken tests: