Bug 240816 - When editing multiple lines in an Investment Account Ledger, Value entries are reset to zero
Summary: When editing multiple lines in an Investment Account Ledger, Value entries ar...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 249464 315711 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-05 17:03 UTC by Jan
Modified: 2013-05-24 11:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
example of wrong performance report (131.96 KB, application/xml)
2010-07-17 15:54 UTC, Jan
Details
Fix editing multiple lines in an Investment Account. (4.74 KB, text/plain)
2013-04-02 12:51 UTC, allan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan 2010-06-05 17:03:09 UTC
Version:           unspecified (using KDE 1.2) 
OS:                Linux

When reassigning the category of all Dividend activities of a given investment to another category, KMM resets all amounts to zero.

Reproducible: Always

Steps to Reproduce:
Suppose there are 2 categories, one "Dividend" and one "Investment income:Dividend"

1. Create a new investment and define a Buy of 1 share
2. Create two dividends, one for $10 and one for $12
3. Select both dividends in the ledger (click 1st and shift-click 2nd) and edit
4. Reassign the Interest field from one category to the other and save

Actual Results:  
The initial values of $10 and $12 have been reset to zero.

Expected Results:  
Dividend values should have been preserved

I am using KMM 1.0.4 under KDE 3.5.10
Comment 1 Jan 2010-06-05 17:44:51 UTC
Perhaps somewhat related to Bug 219742.
Comment 2 Jan 2010-07-17 15:54:19 UTC
Created attachment 49263 [details]
example of wrong performance report
Comment 3 Thomas Baumgart 2010-07-29 19:56:55 UTC
SVN commit 1156795 by tbaumgart:

Don't allow editing multiple investment transactions at once. The tooltip is commented due to the string freeze.

BUG: 240816

 M  +8 -0      kgloballedgerview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1156795
Comment 4 Alvaro Soliverez 2010-08-30 02:58:23 UTC
*** Bug 249464 has been marked as a duplicate of this bug. ***
Comment 5 Alvaro Soliverez 2010-08-30 03:00:50 UTC
SVN commit 1169739 by asoliverez:

Uncomment tooltip when not allowing editing of investment transactions

BUG:240816

 M  +1 -1      kgloballedgerview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1169739
Comment 6 allan 2013-04-01 16:04:17 UTC
I found on my first attempt to use it, that editing multi-transaction investments doesn't work.

I came across this bug from Jun 2010 (KMM 1.0.4 under KDE 3.5.10).   The resolution then was just to disable the functionality, possibly because of an imminent/current freeze, and I wondered if anything had changed.  

it hadn't, I don't think, but I looked at dividend reinvest, which was my immediate interest.  I have now got it working, so will look at the other activities, unless there is a good reason not to.
Comment 7 allan 2013-04-02 12:51:32 UTC
Created attachment 78574 [details]
Fix editing multiple lines in an Investment Account.

Several occurrences similar to 
"if (!isMultiSelection() || (isMultiSelection() && !sharesEdit->text().isEmpty())) "
edited to 
"if (!isMultiSelection() || (isMultiSelection() && !sharesEdit->value().isZero()))"

Multiple transactions of Buy, Sell and Reindiv activities may now be edited.  The remaining activity types were OK.

I aim to commit this in a a week or so, unless anyone thinks a Reviewboard is necessary.
Comment 8 allan 2013-04-02 22:43:03 UTC
*** Bug 315711 has been marked as a duplicate of this bug. ***
Comment 9 allan 2013-04-12 10:12:38 UTC
Git commit 3f45cfc6996f9c2cd2fa01dd0232051c50075651 by Allan Anderson.
Committed on 02/04/2013 at 14:33.
Pushed by allananderson into branch 'master'.

M  +8    -8    kmymoney/dialogs/investactivities.cpp
M  +4    -2    kmymoney/views/kgloballedgerview.cpp

http://commits.kde.org/kmymoney/3f45cfc6996f9c2cd2fa01dd0232051c50075651
Comment 10 allan 2013-04-15 13:01:51 UTC
The patch does do what was intended, but does not deal with attempts to edit mixed investment action/type transactions together.

Also, the tooltips in this part of /kmymoney/views/kgloballedgerview.cpp do not work, so the user does not get any clue as to what is wrong.
Comment 11 allan 2013-04-17 12:09:44 UTC
(In reply to comment #10)
> The patch does do what was intended, but does not deal with attempts to edit
> mixed investment action/type transactions together.
> 
> Also, the tooltips in this part of /kmymoney/views/kgloballedgerview.cpp do
> not work, so the user does not get any clue as to what is wrong.

Just a slight progress report, on starting to look into this.  On selecting a ReinvestDividend and a Buy transaction, the earlier, more relevant tooltip gets lost.  The code appears to lead into 
void KMyMoneyApp::slotUpdateActions(void).  The Edit button is correctly disabled, but the tooltip on it now reads 'Duplicate the current selected transactions', which is totally wrong and misleading.  No tooltips show on any transactions along the way.
Comment 12 allan 2013-04-24 11:23:06 UTC
I had the patch for these issues more or less ready, but in the light of this -
"From: Thomas Baumgart <thb@net-bembel.de>
To: kmymoney-devel@kde.org
Subject: Re: [Kmymoney-devel] KMyMoney ledger view tooltips
<big snip>
> > More and more I get the feeling, that this whole ledger business
> > comes to ages. Many things have been put in there and you stepped on
> > another one of those features. They are around since the KDE3 days
> > and might not have been ported to their full functioning into KDE4. I
> > don't want to blame anyone who worked on the KDE4 port as this was a
> > large job by itself.
> > 
> > Before putting any more effort into getting the existing stuff
> > working, I suggest to re-work the whole ledger view to be based on
> > the MVC paradigm and use the existing Qt4 mechanisms more
> > effectively. I expect a performance boost of the ledger view as a
> > side effect, btw.
> > "
Thomas, do you wan't this to be left in abeyance, or closed?
Comment 13 allan 2013-05-17 10:44:10 UTC
(In reply to comment #12)
> I had the patch for these issues more or less ready, but in the light of
> this -
> "From: Thomas Baumgart <thb@net-bembel.de>
> To: kmymoney-devel@kde.org
> Subject: Re: [Kmymoney-devel] KMyMoney ledger view tooltips
> <big snip>
> > > More and more I get the feeling, that this whole ledger business
> > > comes to ages. Many things have been put in there and you stepped on
> > > another one of those features. They are around since the KDE3 days
> > > and might not have been ported to their full functioning into KDE4. I
> > > don't want to blame anyone who worked on the KDE4 port as this was a
> > > large job by itself.
> > > 
> > > Before putting any more effort into getting the existing stuff
> > > working, I suggest to re-work the whole ledger view to be based on
> > > the MVC paradigm and use the existing Qt4 mechanisms more
> > > effectively. I expect a performance boost of the ledger view as a
> > > side effect, btw.
> > > "
> Thomas, do you wan't this to be left in abeyance, or closed?

@ Thomas
I'd like to revisit this question.

Following my earlier commit, and , as I said previously, It is now possible to edit multiple investment transactions.  However, because of your comment, I did not continue with extending the patch to prevent attempts to edit differing investment types.

I think at least that issue should be dealt with as, the way it is now, it is possible to edit differing types, and the result could be that a type gets changed inadvertently without the user noticing, particularly if a number of transactions is being edited at once.

I don't think this should wait until the suggested reworking of the ledger, as I can't see that happening for some while yet.

What do you think?
Comment 14 Thomas Baumgart 2013-05-24 10:19:29 UTC
Yes, this should be dealt with independent from the ledger rewrite
Comment 15 allan 2013-05-24 10:32:17 UTC
(In reply to comment #14)
> Yes, this should be dealt with independent from the ledger rewrite

Review was raised two days ago  - https://git.reviewboard.kde.org/r/110587/

Whilst not essential, I had already done the coding for the tooltips, before suspending the work, so they are included in the review.  I do think they are helpful.
Comment 16 allan 2013-05-24 11:20:06 UTC
Git commit 9cd5efcea19580b89c13408697de7927fb8971cc by Allan Anderson.
Committed on 21/05/2013 at 21:41.
Pushed by allananderson into branch 'master'.
Improve tooltip visibility in error situations.

M  +2    -0    kmymoney/kmymoney.cpp
M  +71   -3    kmymoney/views/kgloballedgerview.cpp
M  +4    -0    kmymoney/views/kgloballedgerview.h

http://commits.kde.org/kmymoney/9cd5efcea19580b89c13408697de7927fb8971cc