graphefruit / Beanconqueror

An open source project for coffee enthusiasts.
https://beanconqueror.com/
GNU General Public License v3.0
466 stars 65 forks source link

"Roasted before" field not updating for archived coffees #796

Open agubelu opened 3 weeks ago

agubelu commented 3 weeks ago

Hi,

I noticed that the "Roasted before" field stops being updated when a coffee is archived. The value shown for this field in the archived beans section is always the coffee age at the time when it was archived.

To test, you can just create a new coffee roasted today and archive it immediately. After a few days, look for it in the archived beans list and the "Roasted before" value will still be "0 days old".

Is this behavior intended? I was looking for an old archived coffee, and I found it strange that the coffee age doesn't show the proper value with respect to the current date, even if it's archived.

Thanks!

graphefruit commented 3 weeks ago

Hello @agubelu, thank you for the ticket. This is a 50/50 thing. I've changed the calculation coming with the freezing section to realy see what was the oldest date of the coffee until you finished it.

The other situation what was before was what you said: 349days old e.g. I think we could do a trade off with - how old was the coffee until you finished & the general "oldness" - but maybe here a filter system would be a smarter thing to say: Bought in 2023 / 2022 etc.

Best Lars

agubelu commented 2 weeks ago

Thanks a lot for your reply!

I understand now the intention behind the change. Perhaps the name of the field could be changed in the archived section to avoid confusion? Maybe something like "Age when archived" to make it clearer that it will not be updated, and that you should sort by roasting date if you want to order by purchase date.

But this is only a suggestion, of course, feel free to do whatever you think is best :)

graphefruit commented 2 weeks ago

@agubelu I'd like to have a general naming to not have a difference between active and archived, I'll think a bit ;)