Repository navigation
feat(lstsv)!: write allowprev=Y and showxquestions=N as survey settings by default (#240) - #242
Merged
Merged
Conversation
…gs by default (#240) Without limesurvey_allowprev / limesurvey_showxquestions columns, the TSV now carries S allowprev=Y and S showxquestions=N next to shownoanswer=N. A column overrides them; --no-setting-defaults (surveySettingDefaults: false) turns them off. The way back skips all three defaults, so forms round-trip as authored. DDI is unaffected. Snapshots re-blessed: only the two S rows added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jstet
force-pushed
the
feat/default-settings-240
branch
from
November 4, 2026 20:08
04a755c to
989cc33
Compare
Merged
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.
Closes #240.
Implements option 2 of #240. This is proposed, not decided: the maintainer decides at review whether default-on is wanted.
LimeSurvey's own defaults (
allowprev=N,showxquestions=Y) are poor for surveys built from XLSForms: no Previous button, and a "This survey contains 74 questions" line that counts hidden and filtered questions. formtransform now writesallowprev=Yandshowxquestions=NasSrows unless the form sets them withlimesurvey_allowprev/limesurvey_showxquestions(#228).convention:surveySettingsdefaults, next toshownoanswer=N);src/generatedis regenerated by codegen.allowprev=N/showxquestions=Y.surveySettingDefaults(default true) and CLI flag--no-setting-defaultsleave both out, so LimeSurvey's defaults apply.shownoanswerkeeps its own switch (--show-no-answer).limesurveySettingColumns) skips all three defaults, as it already did forshownoanswer=N, so forms without the columns round-trip unchanged.Before / After S rows
Before:
After:
Behaviour change
Every TSV gains these two
Srows, so existing forms behave differently once re-imported into LimeSurvey (Previous button on, question count off). Blessed snapshots (registry/entities,tests/fixtures/surveys) changed only by those two rows. To keep the old output, pass--no-setting-defaultsorsurveySettingDefaults: false, or set the columns in the form.Tests
npm test: 1777 passed (108 files); new cases cover defaults present, override Y/N wins, defaults off via option and CLI flag, round trip leaving the defaults out, DDI free of the defaults.npm run validate: passes.🤖 Generated with Claude Code