< 162026-03-17⋎18 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
12:05symbioquine[m]<mstenta[m]> "symbioquine: ready for review..." <- 🏸
12:12mstenta[m]symbioquine: thanks! good points... forgot about equipment and inventory :-/
12:12mstenta[m]i'll review and respond in more detail in the PR...
15:47symbioquine[m]<mstenta[m]> "symbioquine: thanks! good points..." <- I'm afk, but I wonder if the set of fields to be checked should be populated by a hook implemented in each module which adds log fields...
15:48mstenta[m]Mm yea perhaps
15:49mstenta[m]I'm looking into merging all of these into a single constraint right now, as a first step
15:49symbioquine[m]E.g. the location module (or perhaps a submodule thereof) would "tell" the constraint logic to check the location field.
15:49mstenta[m]Adding a hook would be a simple next step (fixup)
15:50symbioquine[m]The nice thing about a submodule is that it could be separately disabled if admins want cross-farm locations.
15:50mstenta[m]The inventory one is trickier... but I'll look into that once I get the others working
15:51mstenta[m]Interesting idea re: submodule...
15:51mstenta[m]I think we should give cross-farm relationships more thought before we provide any option to enable it though
15:51symbioquine[m]symbioquine[m]: Maybe that's not sufficient granulatity of control though so maybe it needs more thought...
15:51mstenta[m](too much in my head to consider that right now)
15:51symbioquine[m]s/granulatity/granularity/
15:52mstenta[m]I'm going to put all fields into the one constraint first, and make it an entity-level constraint (instead of field-level)
15:53symbioquine[m]I'll be afk for the rest of the day probably (unless I get really lucky with kiddo naps), but should be on early again tomorrow.
15:53mstenta[m]Cool thanks for the input symbioquine!
15:54mstenta[m]I'll try to get something ready for review by tomorrow
15:54mstenta[m](doing all fixup commits right now... so you can follow changes, but ultimately might be easiest to review as a single squashed commit - we'll see)
16:30mstenta[m]<mstenta[m]> "Adding a hook would be a..." <- This might have some complexities/considerations to it... maybe we should just focus on the core fields for now, hard code them, and then reassess as a refactor/feature request post-4.0.0
16:49mstenta[m](For one, I'm not sure if it's possible to inject services into constraint validators... 🤔)
16:49mstenta[m](Also, the inventory_asset check on quantity requires completely different logic than the simple field names)
16:50mstenta[m]I think I have the inventory_asset logic sketched up... adding tests now to confirm it works
17:05mstenta[m]symbioquine: OK I think it's ready for review again. Didn't do the hook piece, but `asset`, `equipment`, `group`, `location`, and `quantity->inventory_asset` fields are all being checked now (with automated tests)

< 162026-03-17⋏18 >