Skip to content

767: accept standard true/false aliases for auto_send and auto_delete - #868

Open
Autio wants to merge 1 commit into
XLSForm:masterfrom
Autio:pyxform-767
Open

Autio wants to merge 1 commit into
XLSForm:masterfrom
Autio:pyxform-767

Conversation

@Autio

@Autio Autio commented Sep 29, 2026

Copy link
Copy Markdown

Closes #767

Why is this the best possible solution? Were any other approaches considered?

Uses the same aliases.yes_no lookup that #766 added for client_editable, applied in the same place in xls2json.py.

The difference is that auto_send and auto_delete have three states, not two. They can be unset, true or false, and an explicit false overrides the client's own setting. So a false alias must still output orx:auto-send="false". It can't be converted to a Python bool and dropped the way client_editable="false" is. Aliases are converted to the strings "true"/"false".

Values that aren't recognised as aliases are passed through unchanged, as before, so this doesn't break any existing form. Raising an error or warning for them could be a follow-up, if you want that.

Boolean cells from Excel already came through as true/false. This change affects text values like yes, No and TRUE().

What are the regression risks?

Low. The literal true and false values produce the same output as before. Only the aliases listed in aliases.yes_no change, from being copied into the XForm as typed (e.g. orx:auto-send="yes", which clients don't recognise) to true or false.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Possibly a short note that the settings accept yes/no-style values. I'm happy to file that if you'd like one.

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests
  • run python -m unittest and verified all tests pass
  • run ruff format pyxform tests and ruff check pyxform tests to lint code
  • verified that any code or assets from external sources are properly credited in comments

🤖 Generated with Claude Code

Closes XLSForm#767

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

Accept standard true/false aliases for auto_send and auto_delete

1 participant