Bug 332795 - Can't delete security if price entries still exist
Summary: Can't delete security if price entries still exist
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 316223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-30 05:19 UTC by Michael T. Garrison Stuber
Modified: 2017-08-20 15:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael T. Garrison Stuber 2014-03-30 05:19:04 UTC
Even if you remove all transactions associated with a security, you can't delete the security from KMM until every stock price quote has been deleted.  While it's possible to do this manually, it's a bit tedious, and it's also non-obvious.  Suggest adding a feature where the user is allowed to delete a security once all transactions have been removed, and is prompted, "Investment price quotes exist.  Do you still want to delete this security?  All price quotes will also be deleted."
The user could then cancel or delete.

Reproducible: Always

Steps to Reproduce:
1.  Create a investment
2.  Add some prices or grab them via online quoting services
3.  Create some transactions for the investment
4.  Delete all transactions
5.  Attempt to delete security
Actual Results:  
6. Deletion not allowed

Expected Results:  
6. Prompt user:  "Investment price quotes exist.  Do you still want to delete this security?  All price quotes will also be deleted."
7. Delete or cancel as per user
Comment 1 NSLW 2017-03-25 07:22:33 UTC
Git commit 3546febfef8ddd8a865044d3a5150b83d06e4f9b by Łukasz Wojniłowicz.
Committed on 25/03/2017 at 07:21.
Pushed by wojnilowicz into branch 'master'.

Delete prices during deleting security
FIXED-IN:5.0

Differential Revision: https://phabricator.kde.org/D4943

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

M  +36   -6    kmymoney/views/kinvestmentview.cpp

https://commits.kde.org/kmymoney/3546febfef8ddd8a865044d3a5150b83d06e4f9b
Comment 2 NSLW 2017-08-20 15:23:52 UTC
*** Bug 316223 has been marked as a duplicate of this bug. ***