collective / collective/collective.exportimport
topic sort criteria do not get added to the json on export
- Dominant language
- Python
- Stars
- 19
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
When testing the topic to collection migration we noticed to `sort_on` and `sort_reversed`metadata 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
```py
self._collection_sort_reversed = criterion.getReversed()
self._collection_sort_on = criterion.Field()
```
with
```py
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.