< 022021-01-03⋎04 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
01:06*generalredneck[m has quit (*.net *.split)
01:06*jcalonso[m] has quit (*.net *.split)
01:08*pllagn[m] has quit (*.net *.split)
01:08*aislinnpearson[m has quit (*.net *.split)
01:08*wombat83[m] has quit (*.net *.split)
01:08*skalakm[m] has quit (*.net *.split)
01:08*enhiguy[m] has quit (*.net *.split)
01:08*JulianF has quit (*.net *.split)
01:08*calbasi_matrix has quit (*.net *.split)
01:08*mmn has quit (*.net *.split)
01:08*Kingdutch has quit (*.net *.split)
01:08*sydney_zimbotech has quit (*.net *.split)
01:08*braught[m] has quit (*.net *.split)
01:08*symbioquine[m] has quit (*.net *.split)
01:08*dazinism has quit (*.net *.split)
01:08*svenn has quit (*.net *.split)
01:08*lauriexwayne[m] has quit (*.net *.split)
01:08*zedrickr11[m] has quit (*.net *.split)
01:08*jgaehring[m] has quit (*.net *.split)
01:08*mstenta[m] has quit (*.net *.split)
01:08*paul121[m] has quit (*.net *.split)
01:08*kunigunde[m] has quit (*.net *.split)
01:09*jcalonso[m] has joined
01:09*generalredneck[m has joined
01:09*svenn has joined
01:09*sydney_zimbotech has joined
01:09*braught[m] has joined
01:09*lauriexwayne[m] has joined
01:09*zedrickr11[m] has joined
01:09*jgaehring[m] has joined
01:09*wombat83[m] has joined
01:09*pllagn[m] has joined
01:09*symbioquine[m] has joined
01:09*mmn has joined
01:09*skalakm[m] has joined
01:09*mstenta[m] has joined
01:09*aislinnpearson[m has joined
01:09*enhiguy[m] has joined
01:09*paul121[m] has joined
01:09*JulianF has joined
01:09*kunigunde[m] has joined
01:09*dazinism has joined
01:09*calbasi_matrix has joined
01:09*Kingdutch has joined
02:37*farmB877 has joined
02:38*farmBOT has quit (Disconnected by services)
09:00*aislinnpearson[m has quit (Quit: Idle for 30+ days)
16:16mstenta[m]ah gotcha - yea so we may want to provide a helper for that - i think we'll need it elsewhere in core as well
16:18symbioquine[m]How does it work with Views? Does filtering on computed fields just happen in the PHP layer?
16:18symbioquine[m]... I guess it must.
16:23mstenta[m]We don't have Views filtering wired up yet - we do have the Views field working, but yea that performs additional PHP to get the entity
16:23mstenta[m]for filtering we will need to add a custom filter handler
16:23mstenta[m]similar to what we had in 1.x
16:24mstenta[m]in 1.x we had a query builder specifically for building the location query, which was used by BOTH the views handlers AND the "entity property info" (which became the unified field system in D8)
16:24mstenta[m]so it's a work in progress :-)
16:25mstenta[m]in D9 i think we'll probably provide an additional service that extends the `log.query` service and adds the conditions we want to the query
16:28symbioquine[m]I guess for now I'll prototype by making the query using the lower-level SQL API and switch to that extended log query service once it's available :)
16:28mstenta[m]although -- we are mainly concerned with `location` for the filtering we need... not `geometry`
16:28mstenta[m]`location` is a bit simpler because if `fixed==true` then location is always empty
16:28symbioquine[m]ah, that makes sense
16:29mstenta[m]`geometry` is tricky and may be hard to represent in a single query now that i think about it
16:29symbioquine[m]But you'd need the geometry filtering if you want to be able to implement that "draw a box to find the assets" kind of functionality...
16:29mstenta[m]for your purposes you may want to have two queries - one for fixed assets and one for non fixed
16:29mstenta[m]right
16:30symbioquine[m]<mstenta[m] "for your purposes you *may* want"> Yeah, I thought about that... start with the logs which match the given geometry and have asset references
16:31symbioquine[m]That could work with the WFS 1.1.0 since it doesn't implement proper pagination, but for later WFS versions it could get pretty expensive to need to do that pagination in the PHP layer...
16:31mstenta[m]and that sort of makes sense (to have two queries) because you are actually querying two different tables... (logs and assets)
16:32mstenta[m]1.x was just one table but that was only because the same `field_farm_geofield` was allowed to be used on both logs and taxonomy terms (areas). In d8+ field definitions are entity-type specific...
16:33mstenta[m](i'm not sure why, but i bet there's a good reason)
16:34mstenta[m]so yea... i think in order to query asset geometry directly (without using the `geometry` computed field on assets), we'll need BOTH a query of `log__geometry` to get movements AND a query of `asset__intrinsic_geometry` to get fixed asset geoms
16:36symbioquine[m]<mstenta[m] "1.x was just one table but that "> That seems good, but it doesn't necessarily imply that it's better to make two queries. Joining both the intrinsic geometry and the relevant log-derived geometry with the asset data as part of a single query allows the pagination to happen at the DB layer instead of needing to collate the results from two queries in the PHP layer.
16:36mstenta[m]yea that's true
16:37mstenta[m]it can certainly be done with a single, albeit less simple, query :-)
16:38mstenta[m]just need the right combination of `JOIN`s and `WHERE` conditions with an `OR` to catch both the fixed and moveable assets
16:39symbioquine[m]yeah
16:39mstenta[m](maybe a subselect would be needed too - i'd need to try it out)

< 022021-01-03⋏04 >