Rothamsted-Ecoinformatics / farm_rothamsted

Custom farmOS features for Rothamsted Research.
GNU General Public License v2.0
6 stars 1 forks source link

CSV Export: Equipment not listed in csv exports of logs #681

Closed aislinnpearson closed 2 months ago

aislinnpearson commented 2 months ago

Hi @mstenta, @paul121,

Leo mentioned to me today that equipment items are no longer appearing in the CSV exports for logs. I wanted to record it here so I can keep track of our internal issues, but I suspect it is part of the problem that I have seen being discussed on the Element chat? Putting it in the milestone, but only as an issue to talk about in our next call. Then, if my hunch is correct, I'll move it over to the FarmOS core list.

Below is an example of the previous export, which we use to keep track of how heavily machinary is used:

image

aislinnpearson commented 2 months ago

Agreed on the call today that this is a core issue

aislinnpearson commented 2 months ago

HI @mstenta, @paul121

Leo very kindly recorded a video to show him replicating the issue for us. It seems the problem is if you select all available logs. If you filter them by category for example, the equipment does appear.

No equipment issue.zip

mstenta commented 2 months ago

Ah thanks @aislinnpearson and Leo! That helps.

A recent release of farmOS fixed a nasty bug with the CSV exports, but at the same time it added a new limitation to them. The bug (which I think you also reported) was that sometimes data was not showing up in the right columns. That's fixed, but the new limitation is that some columns will not be included if you are exporting more than one type of asset/log.

So exporting logs of different types from the top-level /logs lists will not include all columns (like equipment). However, if you export from one of the type-specific lists (eg: /logs/activity), or only select logs of a single type in the full list (/logs), then those columns will be included.

That was a tradeoff we accepted in order to fix the nastier bug. For more details, here is the original bug report: https://github.com/farmOS/farmOS/issues/805, and here is the pull request that fixed it: https://github.com/farmOS/farmOS/pull/842

aislinnpearson commented 2 months ago

Ah okay. Thanks, Mike. Then I think let's close this as a known bug/ issue.