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

topic sort criteria do not get added to the json on export #109

Open
spereverde opened this issue Feb 18, 2022 · 0 comments
Open

topic sort criteria do not get added to the json on export #109

spereverde opened this issue Feb 18, 2022 · 0 comments
Assignees

Comments

@spereverde
Copy link

When testing the topic to collection migration we noticed to sort_on and sort_reversedmetadata seems to not get migrated.
it seems like it is just forgotten to add that to the metadata.

With a quick look it seems that it might be fixed by replacing

    self._collection_sort_reversed = criterion.getReversed()
    self._collection_sort_on = criterion.Field()

with

topic_metadata["sort_reversed"] = criterion.getReversed()
topic_metadata["sort_on"]  = criterion.Field()

in this file:
https://github.com/collective/collective.exportimport/blob/main/src/collective/exportimport/serializer.py#L341

or adding it below the
topic_metadata["query"] = json_compatible(formquery) on line 361

related: https://github.com/plone/plone.app.contenttypes/blob/1.1.1/plone/app/contenttypes/migration/topics.py#L505

Let me know if this seems correct to you, then we will make a PR

@spereverde spereverde changed the title topic sort criteria do not get added to the json metadata on export topic sort criteria do not get added to the json on export Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants