[Bug 7021] New: patron category in the statistics table
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 Bug #: 7021 Summary: patron category in the statistics table Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: nengard@gmail.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com The patron category code should be in the statistics table. We track the item type and item number, but we only track the borrowernumber for the patron and part way through the year the patron's category could change from child to adult - or the patron could be deleted and that will mess with the statistics on circulation/actions based on patron category. Once that data is added to that table, the circulation stats wizard will need to be updated as well. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-10-13 12:00:25 UTC --- I like that idea - not only for when patrons are deleted, but also for anonymization. Having the patron category will be great for statistics in those cases. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #2 from Liz Rea <wizzyrea@gmail.com> 2011-11-11 00:58:24 UTC --- oh yes, instead of just nuking the borrower out of statistics, we can only null their borrowernumber and leave their category. That would definitely make our librarians a bit happier about anonymization. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #3 from Nicole C. Engard <nengard@gmail.com> --- I got asked for this again today, so I'm bumping it :) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.saby@univ-rennes2.f | |r --- Comment #4 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Hello I have just realized I've created a bug for the same idea, but with other informations to store. Could you take a look? (Bug 10778). If you agree I can write a patch. M. Saby -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #5 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- I copy the content of the bug Bug 10778 and close it, as it is a duplicate Mathieu Curently, statistic table contains some information about the item and the borrower (http://schema.koha-community.org/tables/statistics.html): For the item : - itemnumber - itemtype - ccode For the borrower - borrowernumber - associatedborrower - and maybe "usercode" (not documented in schemaspy, so I don't know what it means). I think we should store more information for the borrower : if the borrower record is deleted, we will not be able to get the useful informations (categorycode...) with a JOIN. I am not sure of Koha's behavior if the item or biblio is deleted : if the itemnumber and biblionumber is deleted from statistic table, we could also store more information (as homebranch, location, biblio.serial, biblioitems.itemtype) For the borrowers, I think we need : - categorycode - branchcode - sex - sort1 - sort2 and optionally the ability to record 3 or 4 custom fields with a syspref (for example, to store the extended attributes). Do you agree with that ? M. Saby -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #6 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- *** Bug 10778 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Some of the information proposed by Mathieu is or might be a bit critical - so it would be nice to have a system preference to determine which fields are going to be saved into the statistics table. Maybe we could add the patron category as a first step. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #8 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- (In reply to Katrin Fischer from comment #7)
Some of the information proposed by Mathieu is or might be a bit critical - so it would be nice to have a system preference to determine which fields are going to be saved into the statistics table.
I agreee Maybe we could add the
patron category as a first step.
OK for the categorycode in a 1st step. I think the library of the patron could be recorded too. It is not critical. Do you think we need to store more information about items & biblios too ? Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think items and biblio information is stord in the deleted* tables and can be looked up from there - data privacy not a problem here, so the data doesn't need to be deleted regularly. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #10 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- The bug was assigned to Kyle, but he is not in the contacts. I add him. Kyle, do you still want to work on this? Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle.m.hall@gmail.com |mathieu.saby@univ-rennes2.f | |r -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #11 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- I misread bug's status. It was not assigned. I take it and will propose a patch. For me some info about items and biblio MUST be recorded in this table. Because item location (like patron category) can change over time. The case occured in my library network (books moved from one library to one other), and it was complicated to get the original location. Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #12 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- I will add for the item : - holdingbranch - homebranch - callnumber - location - dateaccessioned for the borrower - categorycode - branchcode - sex - sort1 - sort2 for the record - biblioitems.itemtype (as document_type) - biblio.serial Other interesting fields could be items.barcode items.price items.replacementprice items.issues items.renewal biblio.title biblio.author biblio.publicationyear biblio.publishercode and extended attributes of patrons Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 mathieu saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11230 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #13 from mathieu saby <mathsabypro@gmail.com> --- Before working on that, I would like bug 11230 to be tested. Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olli-antti.kivilahti@jns.fi --- Comment #14 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- lol -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #15 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 29456 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29456&action=edit Bug_7021-Add_borrowers_category_to_statistics_usercode Stumbled upon this issue and thought it would be nice to improve it a bit. Hope it helps. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #16 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- BTW. I am not very keen on adding lots of content to statistics-table. Because it already is gettting verrrrry large. I am not looking forward to it getting larger than absolutely necessary. We already have old_issues and deleted* to keep as history. Our SSD for the DB is only 100GB ;) However I have no data to back up anything. It is possible that suggested modifications won't enlargen the statistics table significantly. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #17 from mathieu saby <mathsabypro@gmail.com> --- (In reply to Olli-Antti Kivilahti from comment #16)
BTW. I am not very keen on adding lots of content to statistics-table. Because it already is gettting verrrrry large. I am not looking forward to it getting larger than absolutely necessary.
We already have old_issues and deleted* to keep as history.
Our SSD for the DB is only 100GB ;)
However I have no data to back up anything. It is possible that suggested modifications won't enlargen the statistics table significantly.
The way Koha is storing statistics is not sufficient at all for a lot of libraries : if you delete some borrower's account, if a borrower's category changes (common in academic libraries), or if you anonymize transactions after a few months (mandatory in some countries), the information stored in statistics table is not sufficient to calculate some figures needed in our annual reports. However, I'm concerned with the "DB size" issue... Do you know if creating columns in a table but NOT filling them (it could depend on the activation of a syspref) will have a significant effect on the size of the database? Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #18 from mathieu saby <mathsabypro@gmail.com> --- By the way, bug 11230 has been signed off. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #19 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 29508 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29508&action=edit Bug 7021 - patron category in the statistics table This patch populates the koha.statistics.usercode with borrowers.categorycode where it is easily available. Currently for statistics.type 'issue' OR 'localuse' OR 'renew'. Supplied a script to UPDATE the old statistics records. Have fun! -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29456|0 |1 is obsolete| | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #20 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Sorry, we are using some ancient version of master by now (but are looking forward to rebasing :) Simply attached this patch in hopes of it being usefull. Looking forward to rebasing into Bug 11230!
However, I'm concerned with the "DB size" issue... Do you know if creating columns in a table but NOT filling them (it could depend on the activation of a syspref) will have a significant effect on the size of the database?
I recall from my lessons that if you set a static size for a column, it always uses that much space. That way searches are super fast. But I am not a DB specialist. Varchar columns need a separate map to find in which sector/address they reside in. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #21 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- BTW. We could possibly have a separate Database inside Koha's MySQL/MariaDB just for statistics. That could be easily separated from the main DB and put somewhere with lots of hard drive space. Also that wouldn't complicate Koha installation one bit because we can use same credentials for both DB's by default. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #22 from mathieu saby <mathsabypro@gmail.com> --- Hello Olli-Anti Bug 11230 has been pushed, so if you still want to work on that, could you - assign 7021 to yourself - refactor your patch - change the status to need signoff? I will have some time to sign it before september. Mathieu -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 mathieu saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|11230 | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #23 from mathieu saby <mathsabypro@gmail.com> --- (also, could you provide a test plan for your patch?) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7021 --- Comment #24 from Nicole C. Engard <nengard@gmail.com> --- Can someone bring this back to the forefront, it's a big deal if we're anonymizing patron circ history because we lose the category. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org