Bug 301137 - 'To Account' of an existing money transfer is displayed incorrectly in edit area
Summary: 'To Account' of an existing money transfer is displayed incorrectly in edit area
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-04 01:53 UTC by Johannes Goller
Modified: 2012-06-06 06:47 UTC (History)
1 user (show)

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


Attachments
It works on this case (273.02 KB, application/octet-stream)
2012-06-05 11:48 UTC, Stephane MANKOWSKI
Details
Screenshot of the bug, using previously attached test case (223.73 KB, image/png)
2012-06-06 01:06 UTC, Johannes Goller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Goller 2012-06-04 01:53:06 UTC
Skroog version 1.3.0

When highlighting an existing 'Transfer' in the 'Operations' view, the target account ('To Acocunt') in the edit area (below the main window) is generally displayed incorrectly. Therefore, when I click on an existing transfer operation and then hit the 'Modify' button without actually making any edit, the 'To Account' is changed to whatever was wronly displayed as 'To Account' in the edit area.

Reproducible: Always

Steps to Reproduce:
1. Create at least three accounts A, B, C
2. Switch to Operations
3. Add a transfer operation from B to C
4. Add / Modify some other operations
5. Click on the transfer operation previously added
6. Look at the edit area below the operations main list
Actual Results:  
The 'To Account' in the edit area will be displayed as account A


Expected Results:  
The 'To Account' should be displayed as C.

If you can't reproduce it, try adding a transfer A->B and confirm that the 'To Account' is wrongly displayed as C, or perhaps a few more variations. Depending on how you name the accounts and in what order you added them, the 'To Account' displayed in the edit area may sometimes be the correct one by accident.
Comment 1 Stephane MANKOWSKI 2012-06-04 20:24:37 UTC
Git commit cddee438fb7a8bf5fa4887292620535d193394f2 by Stephane Mankowski.
Committed on 04/06/2012 at 22:24.
Pushed by smankowski into branch 'Feature'.

M  +1    -0    CHANGELOG
M  +3    -1    plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp

http://commits.kde.org/skrooge/cddee438fb7a8bf5fa4887292620535d193394f2
Comment 2 Johannes Goller 2012-06-05 07:53:19 UTC
I built the latest version from the Feature branch (and confirmed that 'skrooge -v' on the command line returns 1.4.0BETA), but the bug is still there. Are you sure the fix is correct?
Comment 3 Stephane MANKOWSKI 2012-06-05 11:48:41 UTC
Created attachment 71600 [details]
It works on this case

Hi,

It works for me on this test case.

Could you check in sources if you have the correction?
https://projects.kde.org/projects/extragear/office/skrooge/repository/revisions/cddee438fb7a8bf5fa4887292620535d193394f2/diff/plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp
Comment 4 Johannes Goller 2012-06-06 01:05:46 UTC
Thanks for checking. Here is what I did:

Confirmed branch:
09:59 [jogojapan@diogenes skrooge]$ git branch
* Feature
  master


Confirmed bug fix included in code:

10:00 [jogojapan@diogenes skrooge]$ git log | head
commit cddee438fb7a8bf5fa4887292620535d193394f2
Author: Stephane Mankowski <stephane@mankowski.fr>
Date:   Mon Jun 4 22:24:20 2012 +0200

    BUG: 301137: 'To Account' of an existing money transfer is displayed incorrectly in edit area

commit 9a55fa2b7cbe27147392d6ed6e23af0951b9cc5c
Author: Stephane Mankowski <stephane@mankowski.fr>
Date:   Sat Jun 2 22:41:27 2012 +0200


To build it I did this:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=release
make

Note that I did NOT install it. Instead I ran it from within build/bin:

cd bin
LD_LIBRARY_PATH=../lib/ ./skrooge &

(I tried both with and without changing LD_LIBRARY_PATH -- it did not seem to make a difference.)


I have attached a screenshot of the view, using the test case you attached (301137.skg). I opened it, went to the Operations view, and clicked on the second line. That is supposed to be a transfer of $10 from B to C, but in the edit area below it gives A as To-Account.
Comment 5 Johannes Goller 2012-06-06 01:06:45 UTC
Created attachment 71611 [details]
Screenshot of the bug, using previously attached test case
Comment 6 Stephane MANKOWSKI 2012-06-06 06:32:26 UTC
Hi,

You said "Note that I did NOT install it. Instead I ran it from within build/bin".

The correction has been done in a plugin. Plugins can not be loaded by skrooge if not installed.
So, in your case, the previous version of the plugin is loaded, without the correction.

You must install you last build of Skrooge to be able to test the correction.
Comment 7 Johannes Goller 2012-06-06 06:47:21 UTC
Ahh. I see. Sorry for the confusion.

I installed it locally now and added the install directory to the KDEDIRS environment variable before running Skrooge. That works, and I can confirm the bug is fixed.

Thank you very much.