Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about forms with old version of entity spec <2024.* #730

Closed
ktuite opened this issue Oct 2, 2024 · 3 comments · Fixed by getodk/central-backend#1272
Closed

Warn about forms with old version of entity spec <2024.* #730

ktuite opened this issue Oct 2, 2024 · 3 comments · Fixed by getodk/central-backend#1272
Assignees
Labels
backend Requires a change to the API server entities Multiple Encounter workflows frontend Requires a change to the UI needs testing Needs manual testing

Comments

@ktuite
Copy link
Member

ktuite commented Oct 2, 2024

When we migrate the entity form spec in existing entity forms we will not want to accept want to warn about new forms with an old entity spec.

From the above issue:

Once forms are migrated, we will need to check going forward that all form definitions that are uploaded (for new or existing forms) are capable of making offline changes. Specifically, we should reject form definitions that specify an entities spec before 2024.1. That shouldn't be an issue for users using XLSForms (things should work seamlessly), because pyxform will automatically specify 2024.1.

UPDATE: The issue mentioned rejecting form definitions, but we've decided to show a warning about them instead.

One hurdle users might encounter is if they have an old version of their form in XML and it has an old entity spec version. In that case, we can give users info on how to recover (e.g. download upgraded XML, look at spec to figure out changes to apply).

@ktuite ktuite added backend Requires a change to the API server documentation API docs, readme, developer docs entities Multiple Encounter workflows labels Oct 2, 2024
@ktuite ktuite moved this to 🕒 backlog in ODK Central Oct 2, 2024
@ktuite ktuite self-assigned this Oct 2, 2024
@matthew-white matthew-white added the needs testing Needs manual testing label Oct 2, 2024
@matthew-white matthew-white added frontend Requires a change to the UI and removed documentation API docs, readme, developer docs labels Oct 24, 2024
@matthew-white matthew-white changed the title Reject forms with old version of entity spec <2024.* Warn about forms with old version of entity spec <2024.* Oct 24, 2024
@matthew-white
Copy link
Member

We've discussed that it'd be nice not to outright reject forms like this if doing so is not necessary. Instead, we can warn users if the form definition they've uploaded specifies an old spec. I'll update the description above.

Surfacing the warning in Frontend will probably require changes to Frontend. I've added the frontend label to the issue.

I've also removed the documentation label, since it isn't a docs issue. There's an issue at getodk/docs#1855 to update user docs, and an issue at getodk/central-backend#1211 to update API docs. Feel free to edit those!

@dbemke
Copy link

dbemke commented Nov 28, 2024

I'm not sure if this case works as expected - when I upload an old spec entity form which exists in the project first there's the dialog with information about the old spec (I tap "Upload anyway") and then the dialog with information that the form exists in a project appears. Should the dialog informing that the form already exists in the project be the first (and only) one?
Image
Image

Steps to reproduce:

  1. Upload an old spec entity form and publish it.
  2. Try to add the same form again.
  3. The dialog with information about the spec appears, tap "Upload anyway"

@dbemke
Copy link

dbemke commented Nov 28, 2024

Should the warning about the old spec appear only when a user adds a new or also when adds a new version of a form (e.g changing the new spec to the old spec), undeletes the old spec form?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires a change to the API server entities Multiple Encounter workflows frontend Requires a change to the UI needs testing Needs manual testing
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

3 participants