-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Birth Records are rejected when trying to sync. #448
Comments
Spoke with @jgaehring about this today - I'm going to move it to the Field Kit issue queue. It shouldn't be an issue in farmOS/Field Kit 2.x, so we can probably close is as "wontfix" for 1.x. And maybe we can make a 1.x "known issues" list somewhere for reference. But I'll leave it open for now... |
To be clear, this primarily becomes an issue where the user tries to create a birth record in Field Kit then sync it, whereat the server rejects it, with a Although come to think of it, this could be an issue for 2.x as well, for the very same reason as the equipment issue (#449). TL;DR, we're currently using a stub for JSON Schema evaluation in farmOS.js 2.x, which means we can only use entities' base fields. The I may expand #449 then to address both those issues for 2.x, but will leave this issue dedicated to the 1.x issue, since 1.x will be stuck with these schema issues no matter what and will require a separate workaround, if we choose to fix this at all. |
Actually this won't be an issue because The difference with "Equipment" is that it is added to all logs... and only if the |
Also meant to mention: the |
As with #449, this has been resolved since the schema stubs were replaced (farmOS/farmOS.js#26), along with the fact that the |
I've realized that creating birth records in Field Kit results in a broken state, b/c we don't have the UI component for editing the
mother
field, but we're generating a blank birth record log withmother: { id: null }
, which is getting rejected by the server.The
farm_birth
resource describes themother
field as follows:As @mstenta has pointed out, the
data_schema
is the same as for any field of typeentityreference
, as defined here:https://github.com/farmOS/farmOS/blob/da504a1be74f085007f294329c72a368a3029358/modules/farm/farm_ui/farm_ui.module#L58
Yet we're not seeing this issue for, say, the
asset
field of a log, although, perhaps crucially, theasset
field accepts an array of objects, as descibed in the samefarm_birth
resource:This is a significant bug, but no urgent, imo. So hopefully this documents the issue thoroughly, and if there's an easy fix, great, but otherwise perhaps it depends on farmOS/farmOS#243.
Oh, and for reference, here's where I originally described how the
data_schema
field should work: #346 (comment).The text was updated successfully, but these errors were encountered: