New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect/confusing ordering of transactions #328

Closed
hsoft opened this Issue Jun 22, 2013 · 4 comments

Comments

Projects
None yet
1 participant
@hsoft
Owner

hsoft commented Jun 22, 2013

Please see the attached files. This is a distilled down version of something I saw on a larger data set.

  1. The balance is show at £1000 on 1st July.
  2. A scheduled transaction for -£20 is shown next, but the balance is somehow £880. I would expect £980 here.
  3. The next line is a regular transaction for £100. The balance is shown as £900. I would expect £880.
  4. The next is a scheduled transaction for -£20 again. It the balance looks like it has recovered correctly here.

It looks like transactions 2 & 3 were processed in the opposite order to that shown. In my original case there were many more transactions, so it was harder to work out what was going on.

@hsoft hsoft closed this Jun 22, 2013

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

I can reproduce the error with these steps:

  1. Open the moneyguru file attached to the ticket.
  2. Open the "a/c" account.
  3. Click on the "Date" column to invert the sort order.
  4. Click on the "Date" column again to bring it back.

The result is that the schedule spawn, which was supposed to be after the regular transaction is now before it.

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

As I was trying to create an automated test for this, an important detail emerged: For this bug to happen, the document has to be saved and reloaded.

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

Oh, it has nothing to do with save/reload after all, it's just that reloaded transactions have a +1 on their "position" attribute. We can reproduce the problem without reloading if we have 2 transactions and a spawn on the same date.

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

(from [97dab691a584]) [#328 state:fixed] Fixed sorting inconsistency in transaction tables when schedule spawns were involved.
https://bitbucket.org/hsoft/moneyguru/changeset/97dab691a584/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment