collective / collective/collective.exportimport

Collection queries with old query param

Open
#31 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
19
Forks
20
PR merge metrics
No merged PRs in 30d

Description

When exporting ATCollection items the queries might contain outdated configurations. The following query doesn’t work in Plone 5 with plone.app.querystring > 1.3.2 (https://github.com/plone/plone.app.querystring/blob/master/CHANGES.rst#1312-2015-11-26)

```json
"query": [
{
"i": "portal_type",
"o": "plone.app.querystring.operation.selection.is",
"v": [
"News Item"
]
},
{
"i": "path",
"o": "plone.app.querystring.operation.string.relativePath",
"v": "../"
}
],
```

The correct version would be:

```json
"query": [
{
"i": "portal_type",
"o": "plone.app.querystring.operation.selection.any",
"v": [
"News Item"
]
},
{
"i": "path",
"o": "plone.app.querystring.operation.string.relativePath",
"v": "../"
}
],
```

With `plone.app.querystring` there is an upgrade step available (8 -> 9) which you can run to fix imported collections with the wrong queries.

Besides that, should we add some logic to adjust the queries on export/import?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the example collection queries and the plone.app.querystring CHANGES.rst entry linked in the issue, then inspect the existing export/import behavior. The issue does not name source files or tests; completion would require deciding whether query adjustment belongs in export, import, or both, and defining how outdated configurations are handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.