Skip to content

862: simplify language for missing ${} reference error - #867

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

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

Conversation

@Autio

@Autio Autio commented Sep 29, 2026

Copy link
Copy Markdown

Closes #862

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

Uses the first wording proposed in the issue. It names the ${FOO} reference as typed, so a form author can search the form for it. The row/sheet/column prefix is unchanged, so the error still points to the cell.

New message:

[row : 2] On the 'survey' sheet, the 'choice_filter' value is invalid. ${FOO} refers to a field named 'FOO', but no such field exists on the 'survey' sheet.

The existing tests build their expected text from ErrorCode.PYREF_003, so they pass whatever the wording is. I added a test that checks the exact message.

I considered changing PYREF_004 (duplicate names) to match. I left it out to keep this PR to the issue, but I'm happy to add it if you want the two consistent.

What are the regression risks?

Low. Only the message text changes. Anything matching on the old wording would need updating.

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

No.

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

Name the ${} reference in the message so users can search their form for it.

Closes XLSForm#862

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@lindsay-stevens

Copy link
Copy Markdown
Contributor

Hi and thanks very much for your contributions! We appreciate your patience with us as we work to prioritize review. In the mean time, consider visiting the ODK forum if you haven't already. We'd love to learn more about you if you have a moment to introduce yourself. Thank you!

@lognaturel

Copy link
Copy Markdown
Contributor

Thanks again for taking on this issue and introducing yourself on the forum. @lindsay-stevens and I are both on the ODK core team and have been the primary maintainers of pyxform in recent years.

I'm going to close this PR in favor of #873 which goes a little bit further in normalizing other similar reference errors (as you mentioned in your PR description). For better or worse, we file some of these trivial issues instead of just taking them on immediately so that we can take a little more time to consider whether there are other related improvements to make.

You mentioned in your forum intro that there are issues you're particularly interested in for your users. Please comment on those or make sure they're filed so we can triage appropriately. Thanks!

@lognaturel lognaturel closed this Oct 2, 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.

Simplify language for missing ${} reference error

3 participants