Asset Metrics on Homepage Dashboard

Just after migrating data from a 1.x installation to 2.0, and I notice the asset metric on homepage shows all assets in the database including archived assets, for example animals I’ve sold are archived but are still counted in this metric. Is it expected that all assets show here? and if so can I change it to only show active assets?

2 Likes

Ah good observation @Farmer-Ed :smiley:

Yea, I agree it probably isn’t helpful to include archived assets in those counts.

I wonder: would it make sense to show BOTH active and total? Something like this:

Animals: 25 (100)

Where 25 is “active” and 100 is “total” (including archived).

@mstenta you are obviously very busy at the moment, so thank you for the prompt reply.

Personally I’d just like to see the active animals there but maybe others might find having both useful, I suppose having it a user definable option would be more difficult?

But at least I’m happy now it is not just an issue caused by migrating a 1.x SQLite file to 2.0 Postgres DB :cowboy_hat_face:

2 Likes

This was a pretty easy one. I put together a pull request for review: Do not include archived assets in metrics count by mstenta · Pull Request #471 · farmOS/farmOS · GitHub

@Farmer-Ed if this gets merged then it will be fixed in 2.0.0-beta2.

1 Like

Great @mstenta, can’t ask better than that.

1 Like