Skip to content

Conversation

@ktuite
Copy link
Member

@ktuite ktuite commented Oct 21, 2025

Closes getodk/central#1427

Code pulled out of #1628

This PR rejects a form if it has multiple datasets declared AND an old entities version spec (not 2025.1.0 when we are adding entities from repeats). This was easy to do when multiple datasets (like, households and members) were mentioned, but harder to do when it was just one dataset that was in a repeat. At the time of parsing the form definition and having access to the entities spec version, we don't yet know if a dataset is in a repeat or not.

BUT if we expect that the forms with entities from repeats usually come through pyxform, and pyxform adds the jr:template block, then a form with one entity in a repeat WILL look like it has multiple datasets at the time that we're trying to double-check the version.

What has been done to verify that this works as intended?

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

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

Before submitting this PR, please make sure you have:

  • run make test and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

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.

Reject old spec (<2025.1) when multiple entities detected in form

2 participants