Bug 258610 - Problem updating stock prices when sort sequence changed in dialog
Summary: Problem updating stock prices when sort sequence changed in dialog
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 21:03 UTC by David Houlden
Modified: 2010-12-05 12:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Houlden 2010-12-02 21:03:56 UTC
Version:           SVN trunk (using KDE 4.5.3) 
OS:                Linux

Select Tools -> Update Stock and Currency Prices. When the dialog opens click on the date header to sort by date. Now click on Update All. Only one price gets updated and the progress bar goes to 100%.

Reproducible: Always



Expected Results:  
All prices should be updated regardless of the sort sequence.
Comment 1 Cristian Oneț 2010-12-03 23:55:10 UTC
I can't reproduce this here, are you sure that the prices are not updated?
Comment 2 David Houlden 2010-12-04 12:20:01 UTC
Prices are definitely not updated. The status part of the dialog only shows one update and it goes to 100% far too quickly. Here is some more information which may help.

Scenario 1. When the dialog first opens it is sorted by Symbol in descending order. All prices have the same last updated date. If I click once on the date header (a down arrow appears against date) and then update all, only the symbol which was first on the list gets updated. If I click twice on the date header (an up arrow appears against date) and then update all, all prices now get updated. 

Scenario 2. When the dialog first opens it is sorted by Symbol in descending order. All prices have the same last updated date. I select the fourth entry on the list (any one seems to be ok) and click Update Selected. This works ok and updates the selected price. Now I click once on the date header (a down arrow appears against date) and then update all. This time two entries get updated, the one which was first on the list plus the one I just updated individually.
Comment 3 allan 2010-12-04 12:54:59 UTC
(In reply to comment #2)
> Prices are definitely not updated. The status part of the dialog only shows one
> update and it goes to 100% far too quickly. Here is some more information which
> may help.
> 
> Scenario 1. When the dialog first opens it is sorted by Symbol in descending
> order. All prices have the same last updated date. If I click once on the date
> header (a down arrow appears against date) and then update all, only the symbol
> which was first on the list gets updated. If I click twice on the date header
> (an up arrow appears against date) and then update all, all prices now get
> updated. 
> 
> Scenario 2. When the dialog first opens it is sorted by Symbol in descending
> order. All prices have the same last updated date. I select the fourth entry on
> the list (any one seems to be ok) and click Update Selected. This works ok and
> updates the selected price. Now I click once on the date header (a down arrow
> appears against date) and then update all. This time two entries get updated,
> the one which was first on the list plus the one I just updated individually.


I replied directly to the list last night but it hasn't appeared. So...
"
Works OK for me here.  Progress bar advanced in steps, as per normal.

I'm on Version 4.5.90-svn1202701.

If you reverse the order again, does it continue to fail?  ie it doesn't
work at all once you've changed the sort order?

Allan"

Tried again just now after seeing your follow-up, but still all OK for me, including reversing the order.
Comment 4 David Houlden 2010-12-04 13:56:01 UTC
It is only when I sort by date that I see this problem. Sorting by any other column works ok and if I reverse the order as suggested by Allan it also works ok.
I wondered if it is something to do with all the dates being the same but this is very odd. When the dialog opens all dates are 2010-11-26. If I leave it sorted by symbol and update all then they all get changed to 2010-12-03. If I now restart kmymoney and sort the dialog by date, the update all works and they all get updated to 2010-12-03 again. I don't understand this.
Just in case anyone was going to ask, I have done a consistency check and it shows no errors.
Comment 5 allan 2010-12-04 14:42:18 UTC
(In reply to comment #4)
> It is only when I sort by date that I see this problem. Sorting by any other
> column works ok and if I reverse the order as suggested by Allan it also works
> ok.
> I wondered if it is something to do with all the dates being the same but this
> is very odd. When the dialog opens all dates are 2010-11-26. If I leave it
> sorted by symbol and update all then they all get changed to 2010-12-03. If I
> now restart kmymoney and sort the dialog by date, the update all works and they
> all get updated to 2010-12-03 again. I don't understand this.
> Just in case anyone was going to ask, I have done a consistency check and it
> shows no errors.

Ah, now it fails.  I went back to an earlier file with last update 26/29 October.  After changing date order, this only updated one price, the last (also the oldest).  Repeated clicks on update, update one price each time.

I was going to add that 'Cancel' doesn't do anything, but unfortunately, it does.  It causes continuous looping and updating!!!  Had to kill.  Looping didn't occur if I tried 'Cancel' without changing sort order.  It didn't cancel either, though.  Just kept going to the end.
Comment 6 Cristian Oneț 2010-12-05 12:53:30 UTC
SVN commit 1203782 by conet:

BUG: 258610
Disable the sorting while the update is running to maintain the items order at the start of the update process on which the update depends.

 M  +8 -0      kequitypriceupdatedlg.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1203782
Comment 7 Cristian Oneț 2010-12-05 12:54:38 UTC
SVN commit 1203788 by conet:

BUG: 258610
Disable the sorting while the update is running to maintain the items order at the start of the update process on which the update depends.
Merged into the stable branch.

 M  +8 -0      kequitypriceupdatedlg.cpp  


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