Repository navigation
Conversation
Add the plone.app.querystring.operation.string.currentUID ("Current
item") operation. It resolves to the UID of the context where the query
runs, so add-ons can filter their relation indexes by the current item.
No core field uses it by default; the README shows how to enable it.
Make the path (Location) field sortable. The catalog path index already
supports sorting by full physical path; only the registry flag hid it.
Bump the profile to version 16 with an upgrade step for existing sites.
Closes #207
Closes #208
|
@ericof thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
Member
Author
|
@jenkins-plone-org please run jobs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #207
Closes #208
Current item operation (#208)
Adds
plone.app.querystring.operation.string.currentUID("Current item"), with no widget. It resolves to the UID of the context where the query runs, so a collection or listing block placed on an item can filter a relation index by that item (for example, "posts by this author").The issue suggested adding it to a
UIDfield, but core has no such querystring field. The closest candidate,getRawRelatedItems, is disabled and has no indexer for Dexterity content. So no core field uses the operation by default. The README documents how an add-on enables it on the field for its own index.If the context has no UID, the operation adds no criterion, the same as
reference.iswith an empty value.Sort by location (#207)
The
pathfield is nowsortable.ExtendedPathIndexinheritsISortIndexfromPathIndex, which uses the full physical path as the sort key, so no new index or metadata column is needed.Paths sort as strings. Because
-sorts before/, a sibling such as/a-blands between/aand/a/x.Upgrade
The profile goes to version 16. The
upgrade_to_16step registers the operation and setspathas sortable. A test checks that the step leaves the field's other values unchanged.