-
Notifications
You must be signed in to change notification settings - Fork 156
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
Reject system-reserved entity property names case-insensitively #482
Comments
Is it ready for testing? |
yes, ready for testing! |
I’ve played around with property names and got to a point in which I’m not sure exactly how it works/should work. In a form creating entities in the name column I entered "Name” but in bind::entities:saveto collumn I entered "somethingrandom”. I can upload that form to server without error and the property somethingrandom exists. If I reverse columns (in bind::entities:saveto – Name; in name-somethingrandom) then I see "The entity definition within the form is invalid. Invalid Dataset property.” |
This sounds okay to me! The restrictions on The entity property names, the ones in There are two different places that these field name rules are being checked, and that's where the different errors are coming from, but I think that's okay.
I think I'm going to change the error message in the first error from Central, though. It ought to mention Entity List instead of Dataset and I can also make it say the name of the property and the word "save_to". |
Ooh, I really didn't think about Problems that might be surfaced raw. I was thinking backend would always use the word "Dataset." In this case, we could have pyxform do a case insensitive check so the message comes from there. In fact, I wish I'd thought of doing that first. Maybe that would be enough? Then I see you added a note about problems with "Dataset" more generally in #466. Could we consider making sure all of those have a corresponding frontend string? |
@dbemke small note: I see you're using |
Tested with success! |
Tested with success! |
Problem description
We have two unusual system-reserved entity properties that are reserved to ensure seamless use with select questions in form design:
name
andlabel
. Currently these are reserved on a case-sensitive basis. This is a problem for Collect: https://forum.getodk.org/t/entity-based-data-fetch-working-with-enketo-but-not-in-odk-collect/43040URL of the page
Steps to reproduce the problem
Create an entity property with name
Name
.Screenshot
Please don't attach images of QR codes, as those provide access to the server.
Expected behavior
System-reserved entity property names should be reserved case-insensitively to avoid confusion.
The text was updated successfully, but these errors were encountered: