plone / plone/plone.app.querystring

Querystring reader values are always forced to be alphabetically sorted when a title is specified for a vocabulary

Open
#161 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
25
Avg merge
1d 16h
Merged PRs (30d)
2

Description

https://github.com/plone/plone.app.querystring/blob/f626d6a34c0ff51f104f87064e057d25e57f6338/plone/app/querystring/registryreader.py#L97

While this is probably the desired output for most circumstances, if you want to manually sort the order of a vocabulary and have that reflected by the frontend (either in Classic or via REST API) such as with collective.taxonomy, this isn't possible. The values returned by getVocabularyValues are already an OrderedDict so this should be supported.

I've created a test to verify this: https://github.com/plone/plone.app.querystring/pull/160

See https://github.com/plone/plone.restapi/issues/1854 for some context of how this was found

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in plone/app/querystring/registryreader.py at the referenced line and review the test linked from pull request #160. Check how titled vocabularies are converted from the OrderedDict returned by getVocabularyValues, then run the relevant test suite. Done means manually ordered vocabulary values remain ordered for Classic and REST API consumers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.