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

Allow to define the sorting criteria for Result Options #2343

Merged
merged 5 commits into from
Jun 25, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Jun 22, 2023

Description of the issue/feature this PR addresses

Please review and merge senaite/senaite.app.listing#107 first!

This Pull Request adds the field ResultOptionsSorting to services and analyses, allowing the user to choose the criteria on how result options have to be sorted when a Selection, MultiSelect or MultiChoice control is rendered for results selection.

Current behavior before PR

Result options are always sorted alphabetically in Select, MultiSelect and MultiChoice controls on results entry

Desired behavior after PR is merged

Result options are sorted in accordance with the criteria set by the user

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we just make the result options manual sortable?

@xispa
Copy link
Member Author

xispa commented Jun 25, 2023

Why can't we just make the result options manual sortable?

IMO, Manual sorting is ok for when you have a few options only, but is not usable when you have a long list (eg. 100 or more).

@ramonski
Copy link
Contributor

Ok, that makes sense.

@ramonski ramonski merged commit b119db3 into 2.x Jun 25, 2023
@ramonski ramonski deleted the sort-result-options branch June 25, 2023 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants