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

Moving sub-categories deletes them #2187

Closed
golesny opened this issue Feb 2, 2025 · 7 comments · Fixed by #2212
Closed

Moving sub-categories deletes them #2187

golesny opened this issue Feb 2, 2025 · 7 comments · Fixed by #2212
Assignees
Labels
bug fixing-in-next-release Issue is resolved and ready for deploy
Milestone

Comments

@golesny
Copy link

golesny commented Feb 2, 2025

Description
I have translated all categories and deleted some of them. I just had 3 test transactions and 2 accounts (cash+bank).
Then I have moved the sub-categories to another parent but this leads to
1.) the parent was moved to another sub-categories (means I have 4 elements/sub-cats)
2.) after trying to fix these wrongly moved main categories, some sub-categories were not available anymore

To Reproduce
Steps to reproduce the behavior:

  1. Create some sub-categories
  2. Move a sub-category to another parent

Expected behavior
The sub-category is moved to the new parent

Device Information:

  • Device: Pixel 7 Pro
  • OS: Android 15 AP4A.250105.002
  • Storage: Phone Storage + syn
  • Synchronization: 10 min interval and Sync on Start
  • Encrypted: no
  • Security: no
  • App Version: 2025.01.27 (1065)
@golesny golesny added the bug label Feb 2, 2025
@wolfsolver wolfsolver added this to the 25Q1 milestone Feb 2, 2025
@wolfsolver wolfsolver self-assigned this Feb 2, 2025
@wolfsolver
Copy link
Member

Hi @golesny , I made some test and categorey is not missing, but the issue is that the list is not refreshed.

can you confirm that alter reopen app you see the subcat correct moved into new cat? as work arround after move a simple search (click search button), enter any letter, and click close search button will refresh list.

@golesny
Copy link
Author

golesny commented Feb 3, 2025

First, I didn't see the wrong behavior.
I realized it after a while and reloaded the app. I will try to reproduce it again.

@golesny
Copy link
Author

golesny commented Feb 3, 2025

I could reproduce the deletion of moved sub-category.

  1. New database (only local)
  2. Add entry for auto:parking
  3. Add sub-category T1 into Auto
  4. Edit T1, Change parent to bill

T1 ist gone
Reload app didn't help
Refresh (search bar + close) didn't show it.
I will attach the database to this ticket

@golesny
Copy link
Author

golesny commented Feb 3, 2025

I could reproduce the deletion of moved sub-category.

  1. New database (only local)
  2. Add entry for auto:parking
  3. Add sub-category T1 into Auto
  4. Edit T1, Change parent to bill

T1 ist gone
Reload app didn't help
Refresh (search bar + close) didn't show it.

And then change parent of parking To education and now it's wrong Screenshot_20250203-120754.png
There is bill:water:Parking

After reloading it's still there
Also refreshing is not working

@golesny
Copy link
Author

golesny commented Feb 3, 2025

This is the database
https://drive.google.com/file/d/1Z7keok2muE34u0q6reVY5UaSjXx6_Ga3/view?usp=drivesdk

When I select a new parent the category above is used. I could reproduce it a second time

@wolfsolver
Copy link
Member

got it. fixed: 9f1cdb4

thanks..

ps. unfortunately this caused category missing from list in inconsitent state. If you need to recovery your db you, for now need to manually run this SQL statement directly on db with any sqllite editor

-- realign missing category
-- set as inactive with <recovery> info
UPDATE CATEGORY_V1
  set active = 0,
      PARENTID = -1,
      CATEGNAME = CATEGNAME || " [recovered]"
  where CATEGID = PARENTID;

this script make them as inactive and attach to root, so you can easely check if there is any transaction and/or edit them.

@wolfsolver wolfsolver added the fixing-in-next-release Issue is resolved and ready for deploy label Feb 3, 2025
@wolfsolver
Copy link
Member

@golesny we fix also DB during next dB upgrade (desktop 1.9.0) so missing category will become visible and inactive. You will manually delete or reactivate if they have transaction.

@wolfsolver wolfsolver linked a pull request Feb 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixing-in-next-release Issue is resolved and ready for deploy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants