-
Notifications
You must be signed in to change notification settings - Fork 62
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
Dataset properties that are not valid OData identifiers are always empty in entities table #793
Closed
matthew-white opened this issue
May 12, 2023
· 2 comments
· Fixed by getodk/central-backend#873 or #807
Closed
Dataset properties that are not valid OData identifiers are always empty in entities table #793
matthew-white opened this issue
May 12, 2023
· 2 comments
· Fixed by getodk/central-backend#873 or #807
Comments
2 tasks
@sadiqkhoja, I think we still need to use the new |
matthew-white
added a commit
that referenced
this issue
May 23, 2023
2 tasks
matthew-white
added a commit
that referenced
this issue
May 24, 2023
Tested with success! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the name of a dataset property is not a valid OData identifier, then a different name will be used for the property in the OData feed (via
sanitizeOdataIdentifier()
in Backend). In Frontend, the entities table uses the OData feed, but right now, if the name of a property differs from its OData identifier, the property's value is never shown. For example, I created a dataset with a property namedcircumference.cm
, and the property is empty in the table: https://staging.getodk.cloud/#/projects/23/datasets/trees/entities. Yet if you access this entity using the REST API, you can see that itscircumference.cm
property is not empty: https://staging.getodk.cloud/v1/projects/23/datasets/trees/entities/c3e0d5f0-2af5-44bb-ad3f-26fb9f93288b. I think the issue is that we try to access property data using the name of the property, not its OData identifier:central-frontend/src/components/entity/data-row.vue
Lines 14 to 15 in 1e7902b
This isn't an issue in the submissions table because Frontend specifies a query parameter of odata=true when it sends a request to the form fields endpoint. As a result, the endpoint returns OData identifiers for Frontend to use. I think we could have Backend do something similar for dataset properties, or we could import
sanitizeOdataIdentifier()
to Frontend and use it here.Notes for the QA team
A name is a valid OData identifier if it:
A dataset property name is not required to be a valid OData identifier. A property name:
__
).If the name of a property is not a valid OData identifier, the property's name will be changed in the OData feed. The entities table in the Central UI uses the OData feed under the hood, which is why there was this issue.
The text was updated successfully, but these errors were encountered: