Bug 274789 - After deleting a category some schedules could be left with references to the deleted category
Summary: After deleting a category some schedules could be left with references to the...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 274788 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-02 22:51 UTC by Cristian Oneț
Modified: 2011-06-03 17:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Data to reproduce the bug. (5.34 KB, application/x-kmymoney)
2011-06-02 22:52 UTC, Cristian Oneț
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Oneț 2011-06-02 22:51:22 UTC
Version:           SVN trunk (using KDE 4.6.3) 
OS:                Linux



Reproducible: Always

Steps to Reproduce:
With the attached file
1. Check out that there is a schedule refering to the 'Automobil:Combustibil' category
2. Double click on the 'Automobil:Combustibil' category in the Categories view
3. In the ledger that shows the transactions in 'Automobil:Combustibil' select all the transactions and move them to 'Automobil:Fuel'
4. Delete the 'Automobil:Combustibil' and choose to move references to 'Automobil:Fuel'
5. Try to open the schedule or save the file
3. 

Actual Results:  
The schedule will be left behind with a reference to an inexistent account.

Expected Results:  
The schedule's reference should have been updated.

OS: Linux (x86_64) release 2.6.37-gentoo-r4
Compiler: x86_64-pc-linux-gnu-gcc
Comment 1 Cristian Oneț 2011-06-02 22:52:11 UTC
Created attachment 60564 [details]
Data to reproduce the bug.
Comment 2 Cristian Oneț 2011-06-02 22:53:25 UTC
*** Bug 274788 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Baumgart 2011-06-03 12:59:45 UTC
I know where the problem lies and how to fix it. I take over from here.
Comment 4 Thomas Baumgart 2011-06-03 17:45:22 UTC
SVN commit 1234963 by tbaumgart:

Added a more generic way to modify id references

BUG: 274789

 M  +5 -21     kmymoney.cpp  
 M  +0 -7      kmymoney.h  
 M  +6 -0      mymoney/mymoneyscheduled.cpp  
 M  +9 -0      mymoney/mymoneyscheduled.h  
 M  +44 -0     mymoney/mymoneyscheduletest.cpp  
 M  +1 -0      mymoney/mymoneyscheduletest.h  
 M  +25 -0     mymoney/mymoneysplit.cpp  
 M  +9 -0      mymoney/mymoneysplit.h  
 M  +72 -0     mymoney/mymoneysplittest.cpp  
 M  +1 -0      mymoney/mymoneysplittest.h  
 M  +11 -0     mymoney/mymoneytransaction.cpp  
 M  +10 -0     mymoney/mymoneytransaction.h  
 M  +28 -0     mymoney/mymoneytransactiontest.cpp  
 M  +1 -0      mymoney/mymoneytransactiontest.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1234963