Skip to content

[stable5.3] fix(submission): use the same answer checks for validating and storing - #4022

Merged
AndyScherzinger merged 4 commits into
stable5.3from
backport/3916/stable5.3
Nov 25, 2026
Merged

AndyScherzinger merged 4 commits into
stable5.3from
backport/3916/stable5.3

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Backport of #3916 to stable5.3.

Tests

  • Unit and DB integration tests on Nextcloud 33: no new failures compared to plain stable5.3; the added SubmissionServiceTest cases pass. composer cs:check is clean and openapi.json is unchanged.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

An answer is a list of values, and the answer to a grid question an
object with the values by row, as the API describes it. Other values
are rejected as an invalid answer with a 400 instead of failing with a
server error, and an empty list counts as no answer, so an optional
question answered with an empty list is not checked any further.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added bug Something isn't working 3. to review Waiting for reviews AI assisted labels Nov 25, 2026
@AndyScherzinger AndyScherzinger self-assigned this Nov 25, 2026
@AndyScherzinger AndyScherzinger mentioned this pull request Nov 25, 2026
1 task done
@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Chartman123 and others added 3 commits November 25, 2026 09:05
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
The rows and columns of an answer to a grid question are compared as
canonical integers with the ids of the options of the question, as the
options of other questions are. A row or column id in another notation,
such as "020" for the column 20, is not a valid option.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Validating an answer and storing it each had their own checks for the
option ids of a question and for the answer "Other". Both now use the
same helpers: the answer "Other" is recognized in one place, and option
ids are read by one function, which takes a number or a string of its
digits, as the API documentation now says. The message for an answer to
a question that is not part of the form names the id as it was sent.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger merged commit fbb278a into stable5.3 Nov 25, 2026
51 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/3916/stable5.3 branch November 25, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants