< 242023-07-25⋎26 >

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
16:06*steve456[m] has quit (Remote host closed the connection)
18:06*farmBOT has joined
21:09paul121[m]Okay, this idea comes up a lot in my head: "intrinsic location". I want to specify an asset's fixed location without needing to create movement logs.
21:10paul121[m]We have "intrinsic geometry" which lets you say an asset is hard-coded to be at a given location. I think "intrinsic location" could work similarly so I can hard-code an asset's location to always be that of another location asset.
21:10paul121[m]s///
21:11paul121[m]This is similar/can almost be achieved with the location hierarchy (setting an asset's parent to that of another location asset).... but it requires that the child asset is a location as well. In this case, the child asset is not a location, but I know it will not be moving, so thus I want an "intrinsic location"
21:18mstenta[m]I suppose that could make sense - and might work off of the same is_fixed logic
21:18mstenta[m]Curious: what use-cases are you think about?
21:18mstenta[m]We added intrinsic geometry specifically for location assets
21:19mstenta[m]But it sounds like you want assets with is_location: False + is_fixed: True?
21:19paul121[m](yes! is_fixed is important context here, thanks)
21:20paul121[m]Assigning the location of a Product asset is top of mind rn
21:20mstenta[m]Related: this reminds me we talked about making the computed location show the parent of location assets.
21:21mstenta[m](Because right now the "Location" column of Land assets, for example, is always blank)
21:21mstenta[m](It would be nice if it showed the parent)
21:21paul121[m]But I think this would also be useful for more perennial plant assets (like orchard/tree) where seeding/transplanting movement logs may not be available or necessary
21:21mstenta[m]So what you're describing might involve touching some of the same logic
21:22mstenta[m]Yea those two use-cases are good ones
21:22mstenta[m]I think adding intrinsic_location would be a non-breaking change, so it could happen in the 2.x branch
21:23mstenta[m]Maybe worth opening a d.o issue to start outlining everything that would need to happen + all considerations
21:23paul121[m]Interesting... I suppose you could use the `asset.parent` + `is_fixed` to represent "intrinsic location", perhaps?
21:24paul121[m]But that kinda makes things complex. Product assets might have valid reasons to have a product asset as a parent
21:24mstenta[m]right yea sorry i was thinking about them as separate things...
21:25mstenta[m]hmm
21:26mstenta[m]maybe we would want to migrate all location asset parents to the new intrinsic_location field and use that for hierarchy instead?
21:26mstenta[m](that would be a breaking change)
21:27mstenta[m]then we could just say: "if is_fixed is true, the computed location == intrinsic_location (as well as intrinsic_geometry)"
21:29paul121[m]mstenta[m]: yeah was wondering the same
21:29mstenta[m]that would simplify some things
21:29mstenta[m]but it's a big change
21:30paul121[m]is is_fixed needed for this though? right now it basically allows you to add geometry as metadata to an asset, but only use it as the location if is_fixed = True
21:30paul121[m]I'm not sure we need "intrinsic location" to ever NOT be the asset's actual location? does that make sense?
21:31mstenta[m]intrinsic_geometry is only shown in the UI and used in logic if is_fixed is true. so i figured it would work the same as that.
21:31paul121[m]in other words, if intrinsic_location is set, it is the law
21:32mstenta[m]in other words, intrinsic_geometry basically doesn't exist when is_fixed id false
21:32mstenta[m]gotcha. that would mean intrinsic_geometry and intrinsic_location work differently, then... which would be confusing
21:32mstenta[m]is_fixed essentially means "not moveable"
21:33mstenta[m]so when is_fixed is false it means "this asset is movable"
21:33mstenta[m]so i would think we want intrinsic_location to be the location of the asset ONLY if it is fixed
21:33paul121[m]yeah that makes sense
21:34paul121[m]I guess I wonder why we added is_fixed ? instead of just letting the presence of intrinsic_geometry determine that?
21:34mstenta[m]otherwise: what would it mean if you had a movable asset with an intrinsic geometry? what would happen if you added movement logs?
21:34paul121[m]I imagine there was a reason! :D
21:34mstenta[m]that's a fair question! maybe it could have worked without is_fixed
21:35paul121[m]It's just more explicit it seems
21:35mstenta[m]yup
21:35mstenta[m]we can review everywhere is_fixed gets used...
21:35mstenta[m]and if that made sense then maybe we consider this for 3.x
21:36mstenta[m](remove is_fixed and just key off of the presence of intrinsic_geometry and intrinsic_location)
21:36paul121[m]so then: what gets priority? `intrinsic_geometry` or `intrinsic_location`? both, similar to how a movement log w/ geometry & location works?
21:36mstenta[m]i would think if EITHER are set, then it means the asset is fixed
21:36mstenta[m]but the other could be blank
21:37paul121[m]and if both are set?
21:37mstenta[m]and then movement logs are ignored for that asset
21:37mstenta[m]if both are set, that's the asset's location + geometry
21:37mstenta[m](same as it works now on movement logs)
21:37paul121[m]sorry yeah that's what I was trying to say :-)
21:39mstenta[m]> maybe we would want to migrate all location asset parents to the new `intrinsic_location` field and use that for hierarchy instead?
21:39mstenta[m]thinking... are there any risks with this?
21:39mstenta[m]... cases where it might break a user's data if their asset's parents disappeared?
21:44paul121[m]Certainly could be breaking to existing conventions/integrations... but not sure how it would "break"
21:45paul121[m]* would "break" outside that context
21:45paul121[m]hmm
21:58mstenta[m]Yea seems like it would be pretty safe

< 242023-07-25⋏26 >