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

Number of future recurrent records gets doubled #79

Closed
jiru opened this issue Jan 28, 2024 · 3 comments
Closed

Number of future recurrent records gets doubled #79

jiru opened this issue Jan 28, 2024 · 3 comments

Comments

@jiru
Copy link

jiru commented Jan 28, 2024

Using 1.0.44 APK release from GitHub, one should be able to reproduce this bug.

  1. Now is the 28th of January, 2024.
  2. Clear app storage and start app.
  3. Tap "calendar", show records per year, 2024
  4. Tap "+" to add a new record: set amount to 10, set date to at least one week later (4th of February or later), set repeat every week.
  5. Two new records show up: on the 5th and 12th of February. Total expenses is 20.
  6. Tap any of these records.
  7. Tap "←" to go back.
  8. Two new records show up: on the 19th and 26th of February. Total expenses is 40.
  9. Repeat from step 6 and notice the number of records is doubled every time.

It looks like the doubling of records happens regardless of the calendar view. In other words, even after 2024 is full of weekly records, the app will keep adding new records to 2025 and so on, resulting in exponential growth of the database. Attempting to backup the database produces an ever growing file that can easily turn into several megabytes of json.

I was also able to reproduce this bug with biweekly and daily recurrent records, but not monthly ones.

@jiru
Copy link
Author

jiru commented Jan 28, 2024

By the way, my use case is to check how some combination of weekly, monthly and quarterly expenses and incomes would sum up in the next few months. I wonder if the recurrent records functionality could be used in that way.

@emavgl
Copy link
Owner

emavgl commented Jan 28, 2024

https://github.com/emavgl/oinkoin/releases/tag/1.0.45 contains a patch for it. Recurrent records creates the records until the date of today. So I fear it is not possible to have an outlook for the future, it would be interesting though. I'll close the issue since the it should be fixed with 1.0.45. Feel free to comment/open it in case it is not. Regarding your use case, I'll keep in mind and I see if I can get an idea on how to achive that, if you want, you can open another issue as feature request for it.

@emavgl emavgl closed this as completed Jan 28, 2024
@emavgl
Copy link
Owner

emavgl commented Jan 30, 2024

Your use-case has also been pitched here: #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants