Bug 16122 - Item record needs to keep Local Use count
Summary: Item record needs to keep Local Use count
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-22 15:46 UTC by Christopher Brannon
Modified: 2019-06-20 14:17 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2016-03-22 15:46:06 UTC
Like the "issues" field in the items table, there should be a field for "local_use" to keep the count of local uses.  While this information is kept in the statistics table, it is a task to acquire, and if a library wants to keep bloat down on their tables, the statistics are pruned on a regular schedule, which means loss of valuable data.  This counter would keep that valuable information in one field in each item record, rather than having a separate field for each instance in the statistics table.

Unless it is vital to someone to know the exact moment a local use occurred, I am suggesting that this piece of information not be recorded in the statistics table any longer.  This would significantly reduce the growth of the statistics table in general.

Christopher
Comment 1 Katrin Fischer 2016-03-22 20:35:10 UTC
I think an option would be ok, but I am against removing it - the local use information in statistics will allow to look up the timeframe (local uses in the last x months, years...) which is useful information.
Comment 2 Christopher Brannon 2016-03-22 21:02:36 UTC
Perhaps a switch to turn the statistic on/off?  But add the counter to the record.
Comment 3 Katrin Fischer 2016-03-22 21:04:52 UTC
Could work :)
Comment 4 Andrew Fuerste-Henry 2019-06-12 14:42:18 UTC
I absolutely agree if would be handy to have a local use number in the record -- and then to show that number on moredetail.pl.

But I also agree with Katrin that I don't see why we would remove those transactions from the statistics table.
Comment 5 Christopher Brannon 2019-06-12 15:15:22 UTC
Read the second paragraph.  It addresses this question.
Comment 6 Katrin Fischer 2019-06-18 22:16:16 UTC
My feeling is that a simple counter loses meaning the longer you keep the data.

What's better? 5 local uses in 10 years or 5 in one? With a simple counter, there is no way to tell. I think issues might give an indicator about 'use' of the book (when you might want to replace it), but not sure the local_use is interesting in the same way. 

That said, we could split the circulation log preference to not record.

Is the size of the data in statistics really that much of an issue? I seem to remember that some libraries have kept their data without pruning ever and have to say we don't prune either and have some systems running for almost 10 years now. It's only used for statistics, so it doesn't slow anything down.
Comment 7 Christopher Brannon 2019-06-19 14:24:32 UTC
The bigger the system, the more data you have to sift through, and it can make reports very sluggish.

I'd be fine if it were kept in the logs, if there were some mechanism that could prune the logs of items that are deleted, and the pruning could be fine tuned as needed.
Comment 8 Katrin Fischer 2019-06-20 14:17:15 UTC
I get a feeling that opinions on the stats tables vary wildly. As I said, I would not prune them, but only anonymize them if necessary. Having an idea about when something happened seems important to me. Having jobs with different options make sense.

BTW: as far as I know it won't free space with MySQL if you delete lines. So that should not be a reason?