Bug 14687 - Patron's transaction history changes items' order after paying fines
Summary: Patron's transaction history changes items' order after paying fines
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P4 minor
Assignee: Joonas Kylmälä
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-17 12:29 UTC by Joonas Kylmälä
Modified: 2020-04-12 21:48 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14687: Patron's transaction history changes items' order after paying fines. (1.02 KB, patch)
2015-08-17 12:56 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 14687: Patron's transaction history changes items' order after paying fines. (1.06 KB, patch)
2015-11-06 01:45 UTC, Liz Rea
Details | Diff | Splinter Review
[PASSED QA] Bug 14687: Patron's transaction history changes items' order after paying fines. (1.13 KB, patch)
2015-11-06 13:00 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Kylmälä 2015-08-17 12:29:07 UTC
1. Go to: Staff side -> Patrons -> X patron -> Fines -> *Create manual invoice*
2. Create one invoice with amount of 1.
3. Create other invoice with amount of 2.
4. Go to tab *Account* and take a look how the transactions are ordered.
5. Go to tab *Pay fines* and click Pay amount and then confirm.
6. Now you can see that in the *Account* tab the order of transactions have changed and that they go in the wrong order now.
Comment 1 Joonas Kylmälä 2015-08-17 12:56:11 UTC Comment hidden (obsolete)
Comment 2 Joonas Kylmälä 2015-08-17 12:57:24 UTC
Test plan for the patch above:

1. Go to: Staff side -> Patrons -> X patron -> Fines -> *Create manual invoice*
2. Create one invoice with amount of 1.
3. Create other invoice with amount of 2.
4. Go to tab *Account* and take a look how the transactions are ordered.
5. Go to tab *Pay fines* and click Pay amount and then confirm.
6. Now you can see that in the *Account* tab the order of transactions have changed and that they go in the wrong order now.
7. Apply patch and see that the transactions are now ordered from newest to oldest.
Comment 3 Liz Rea 2015-11-06 01:45:04 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall (khall) 2015-11-06 13:00:33 UTC
Created attachment 44552 [details] [review]
[PASSED QA] Bug 14687: Patron's transaction history changes items' order after paying fines.

Sorts Patron's accounting data consistently from newest to oldest.
It doesn't depend on anymore to timestamp (which can be same for multiple
entries) from database but instead uses accountline's id to sort.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi (tcohen) 2015-11-09 15:52:55 UTC
Patch pushed to master.

Thanks Joonas!
Comment 6 Frédéric Demians 2015-11-29 20:36:46 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 7 Liz Rea 2016-01-06 21:21:30 UTC
Pushed to 3.18.13, and released.