Repository navigation
[stable5.4] fix(export): keep cells under their headers for empty grid and ranking answers - #4004
Draft
backportbot[bot] wants to merge 1 commit into
Draft
backportbot[bot] wants to merge 1 commit into
backportbot[bot] wants to merge 1 commit into
Conversation
…g answers The export writes one column per row of a grid, per row and column of a number grid and per option of a ranking. Three cases wrote fewer cells than the header has columns, so every later cell on the line, including the answers to all following questions, moved left: - a number grid row left completely empty wrote one cell instead of one per column, - a grid or ranking question left unanswered wrote one cell instead of one per export column. Also, a number grid cell answered with 0 was exported empty, because empty() treats 0 as missing. Fixes #3980 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AndyScherzinger
force-pushed
the
backport/4001/stable5.4
branch
from
November 23, 2026 09:58
890edaa to
2ab2a38
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #4001
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Conflict resolution
The automatic backport left out the hunk that writes one empty cell per export column for a grid or ranking that was not answered, because
stable5.4has noanswerExportValue()(typed export cells only exist onmain). It is added back in the 5.4 form,$row[] = $answer;, so all three cases of #3980 are fixed on 5.4. The[skip ci]line is removed from the commit.Checked on
stable5.4(Forms 5.4.3, Nextcloud 35): the four newtestGetSubmissionsDatacases and all ofSubmissionServiceTest(102 tests) pass. Without the added hunk,grid-unansweredandranking-unanswered-before-another-questionfail.Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.