Skip to content

fix(submission): keep the text of an answer "Other" as typed - #3882

Merged
Chartman123 merged 1 commit into
mainfrom
fix/noid/other-answer-prefix
Nov 11, 2026
Merged

Chartman123 merged 1 commit into
mainfrom
fix/noid/other-answer-prefix

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Storing an answer "Other" removed every occurrence of the prefix system-other-answer: from the text the respondent typed, not only the leading one, so a text that contains the prefix was stored shortened. The server now removes only the leading prefix, as the submit view already does when it shows the answer.

Found while reviewing #3833, which changes the line above this one, so whichever of the two lands second needs a small rebase.

Tests

  • ApiControllerTest::testNewSubmission_answers stores an answer "Other" whose text contains the prefix.
  • PHPUnit passes, except the 3 IUserFolder errors main also has on the test instance; php-cs-fixer is clean.

🤖 AI (if applicable)

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

Storing an answer "Other" removes only the prefix system-other-answer:
at its start, as the submit view does, instead of every occurrence of
it in the text.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@Chartman123

Copy link
Copy Markdown
Collaborator

/backport to stable5.4

@backportbot backportbot Bot added the backport-request Pending backport by the backport-bot label Nov 11, 2026
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Chartman123
Chartman123 merged commit eac04ab into main Nov 11, 2026
50 checks passed
@Chartman123
Chartman123 deleted the fix/noid/other-answer-prefix branch November 11, 2026 10:33
@backportbot backportbot Bot removed the backport-request Pending backport by the backport-bot label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants