-
Notifications
You must be signed in to change notification settings - Fork 132
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
Metadata parity between the JSON and XForm data endpoints #2107
Comments
heavy +1 :) |
@gstuder-ona Do you mean on the XForm XML? Can you be specific, please? Note, this information will not show up in the XForm XML and is not intended to show up on the XForm XML. |
@ukanga I think I was pretty clear in the above - ona-specific metadata (as opposed to XForm metadata like start/end) should not show up in the XForm XML data itself. However, the XML envelope that comes back This is pretty much the same as injecting metadata as I am 100% on board with the XForm results coming back with no processing, this is particular OnaData metadata that is never stored in XForm. |
@gstuder-ona Adding most of the metadata fields currently provided by the JSON endpoint is pretty do-able and it'll be fine to add to the But there are a few fields namely: If the
PS: The
CC: @denniswambua |
Gonna let @gstuder-ona confirm here, but option 3 seems the most reasonable at a glance |
Option 3 seems fine with me - though I'm a little worried that it could be technically allowed that the form data element has a name of "server-meta". Is that accurate? Arguably it's not a huge deal as the ordering of XML elements can be used to parse, so the first element is always just the data. Upshot is I'm okay with #3 but leave it up to @DavisRayM and the OnaData team to decide whether it makes sense to have an explicit data wrapper element like |
Suggested Feature / Enhancement
Currently OnaData-specific metadata like "_submitted_by" , "_review_status" ,"_review_comment", "_last_edited" are not available in the XForm API - this makes the data unavailable to XForm-based ETLs and other tools.
Benefits of implementing the feature/enhancement
We'll need the submitted_by and review fields for clients that need to audit who was editing their data. Arguably it would also make the API more consistent if the format didn't determine which data was available.
Suggested implementation plan(Steps to be taken to implement feature)
Audit the metadata fields added to the JSON data endpoint and ensure they're added as
submission-item
attributes in the XForm endpoint.Random note - last_edited isn't quite the same as last_modified, and including both may be important so a user can know who last modified a form via the UI.
@DavisRayM - just because you've touched this code before
The text was updated successfully, but these errors were encountered: