Bug 12235

Summary: Logs organized inconsistently
Product: Koha Reporter: David Cook <dcook>
Component: Transaction logsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: arouss1980, jonathan.druart, katrin.fischer, severine.queune
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10680
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16829
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14444
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10352
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description David Cook 2014-05-13 01:43:32 UTC
The database structure for the transaction logs doesn't work very well.

When you view the "Modification log" for a patron or a bib record, you're viewing the logs for the "object" with that borrowernumber or biblionumber.

However, this often has surprising results, especially in the "Catalog" module.

For instance, the "Modification log" for bib record #1 will show you the logs for bib record #1...and item record #1. However, if won't show you the logs for item record #2, which is attached to bib record #1.

This is a problem.

While it might be fair that the "Modification log" for bib record #1 shouldn't have to show the logs for its attached items, it shouldn't show unrelated results for other items.

--

A structure more in line with expectation might be something like:

-System user (i.e. the librarian)
-Biblionumber
-Itemnumber (or maybe AttachedNumber so this could be either items or serials)
-Info

Or at least some other way of differentiating what is in the "object" column. 

I had to perform 3 different (arguably "expert") queries just to find out that item #2 from bib record #1 was checked in by patron #3.

Why?

First query: Retrieve bib record...don't find correct item information using bib ionumber object
Second query: Retrieve item record using correct itemnumber object...
Third query: Search for itemnumber in "info" column, so that it brings up the circulation transaction.

--

I'm tempted to write a patch for this, but I wonder about pre-existing logs. Do we try to convert them to match a new schema, or do we ignore them, or do we back them up then wipe the table for fresh logs?
Comment 1 Katrin Fischer 2020-01-05 14:10:16 UTC

*** This bug has been marked as a duplicate of bug 10352 ***