Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset travel statistics after Klimaticket is renewed #2

Open
Crazyphil opened this issue Dec 4, 2023 · 2 comments
Open

Reset travel statistics after Klimaticket is renewed #2

Crazyphil opened this issue Dec 4, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Crazyphil
Copy link

Currently, it seems that the travel journal simply keeps counting up the ticket prices in the travel statistics and with it the Klimaticket gains. However, these gains should be reset every time the Klimaticket is renewed, because then the price of the ticket has to be gained again as well.

The information about when the Klimaticket is renewed is already there in the profile (given that for the ticket no bonus months or other shenanigans are added). There could also be another page where one can compare the statistics for different validity periods instead of just the current period.

@Dosenpfand Dosenpfand self-assigned this Dec 4, 2023
@Dosenpfand
Copy link
Owner

Dosenpfand commented Dec 4, 2023

My current use-case looks like this: I set the "Klimaticket start date" in my profile to the start date of my current ticket. That way the "Statistics" and the "Current" travel journal tab should only account for trips with date > that start date. This has the advantage of supporting special extended tickets (but i guess these are anyway not coming back) and gaps in my ticket if i don't immediately renew it. Of course it has the disadvantages of needing to set this ~ once a year and only having a single archive that are not split up by individual past tickets.

I guess we could support both my and your use case by automatically making the current start date of the ticket the start day + month of the profile + the year that this date last occurred in. E.g. if the ticket start date in your profile is 2021-12-20 and the current date is 2023-12-12-04, then the calculated start date will be 2022-12-20.

Would that work for you?

Statistics and archives per year could then also be added.

@Dosenpfand Dosenpfand added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Dec 4, 2023
@Crazyphil
Copy link
Author

Actually, simply setting a new start date manually would be a perfectly acceptable workaround for me. I didn't think of this (and thought that there might be data loss), and there is a high chance that one is reminded to change the date as soon as the statistics don't make sense anymore. If the start date changes automatically after a year, this is just an added bonus.

For historical statistics, one could also simply add multiple validity date ranges to the profile, so instead of using a single text field, each Klimaticket purchase is an additional entry in the database. This would also foresee eventual price increases for the ticket, which would need to be considered in those historical statistics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants