nextcloud / nextcloud/forms

feat: extra settings for ranking question type

Open
#3,378 14 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement
Dominant language
JavaScript
Stars
382
Forks
127
Avg merge
19h 31m
Merged PRs (30d)
75

Description

Nextcloud:

  • Nextcloud-Version: N/A
  • Forms-Version: 5.3.0-alpha.0

Is your feature request related to a problem? Please describe.
I am regularly holding a vote through Nextcloud Forms where users have to rank a subset from a list of options. The results are then weighted using a Borda count. (n points for the first/top choice, 1 point for the last/lowest choice)

Describe the solution you'd like
The new ranking question type is great and almost exactly what I need. The only problem is, that it forces the user to rank all available options. There already exists the extra setting optionsLimitMax for the multiple question type, so could that be implemented for the ranking as well? (and optionsLimitMin should probably be implemented alongside it)
The Borda count code would have to be modified as well to be based on the amount of actually submitted options instead of all available options.

Describe alternatives you've considered
I am currently working around this limitation by using multiple dropdown inputs (one for each choice), exporting the submissions as CSV and pipe them through some python code to sort out potential duplicates and do the actual weighted counting.

Additional context
#1278
#3262
@datapumpernickel would you be willing to work on this or should someone else take a look at it?

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 by tracing the ranking question type and the existing optionsLimitMax/optionsLimitMin handling for multiple questions. Then locate the Borda count calculation and determine how submitted options are counted. Done means ranking accepts configured minimum and maximum selections and Borda scoring uses the number of submitted options; add or update relevant tests if the project has them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.