Summary: | Order fines by date and time | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Circulation | Assignee: | Kyle M Hall <kyle.m.hall> |
Status: | RESOLVED DUPLICATE | QA Contact: | Bugs List <koha-bugs> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aleisha, helpdesk, koha.sekjal, marjorie.barry-vila, mtompset, oleonard, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
fines
Proposed fix [SIGNED-OFF] Fix for Bug 2601 - Order fines by date and time fines out of order |
Description
Chris Cormack
2010-05-21 00:53:20 UTC
Created attachment 5881 [details] [review] Proposed fix When a fine is paid off the modification of the original account line containing the fine gets its amount zeroed out and a line is added saying "Payment,thanks." Both these transactions happen at virtually the same time, so they cannot be ordered one after the other based on the timestamp. This patch adds a one second delay bewteen the two steps, and outputs the timestamp rather than the date of each transaction so that it is unambiguous when each one happened. NOTE: This fix will only fix the sorting of future transactions. Created attachment 5889 [details] [review] [SIGNED-OFF] Fix for Bug 2601 - Order fines by date and time When a fine is paid off the modification of the original account line containing the fine gets its amount zeroed out and a line is added saying "Payment,thanks." Both these transactions happen at virtually the same time, so they cannot be ordered one after the other based on the timestamp. This patch adds a one second delay bewteen the two steps, and outputs the timestamp rather than the date of each transaction so that it is unambiguous when each one happened. NOTE: This fix will only fix the sorting of future transactions. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> I disagree with adding a 1 second performance delay to fines payment just to improve sorting. C4::Accounts needs to be rewritten, anyway, and the addition of an accountlines primary key could resolve this in a more efficient manner. I'm going to mark this as Failed QA, but I recognize this is only my opinion on the matter. I'm open to debate on the subject, and will relent if the community feels this kind of performance hit is justifiable. Accountlines primary key was added by Bug 7671. Is this bug still valid? Marc Created attachment 17109 [details]
fines out of order
Things are still sorted strangely - it's not the order in which the actions took place. I numbered them in purple to show what order I entered them in.
(In reply to Nicole C. Engard from comment #5) > Created attachment 17109 [details] > fines out of order > > Things are still sorted strangely - it's not the order in which the actions > took place. I numbered them in purple to show what order I entered them in. I realize I'm a bit late to this (and new to KOHA), but the accountno field in the accountlines table monotonically increases per patron/borrower for each transaction injected into the table. It can be used to sort the transactions in proper order without much of a performance hit. If this was not the proper avenue to post this, please point me in the right direction. How can this be Failed QA if the patch is obsoleted? I think this would be fixed by the patch from Bug 16486, which adds the timestamp as a column to fines tables, so it could be sorted on |