Bug 3397 - Deleting item record leaves a hole in patron's reading history
Summary: Deleting item record leaves a hole in patron's reading history
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 03:02 UTC by Mickey Coalwell
Modified: 2013-12-05 20:05 UTC (History)
6 users (show)

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


Attachments
Hole in reading record example (61.76 KB, image/png)
2009-07-06 15:03 UTC, Chris Cormack
Details
Proposed fix (975 bytes, patch)
2011-05-18 14:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Signed-off patch (1000 bytes, patch)
2011-05-28 21:14 UTC, Magnus Enger
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:10:01 UTC


---- Reported by mcoalwell@nekls.org 2009-07-06 15:02:31 ----

Deleted items continue to display in Fines, but disappear from the Reading History. See screen shot. Pull from deleted items table? Or pull title info from bib record? What if bib is also deleted? Not sure of the best solution.



---- Additional Comments From mcoalwell@nekls.org 2009-07-06 15:03:28 ----

Created an attachment
Hole in reading record example





--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:10 UTC  ---

This bug was previously known as _bug_ 3397 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3397
Imported an attachment (id=1278)

Unknown operating system Windows 2000. Setting to default OS "All".
Actual time not defined. Setting to 0.0
The original submitter of attachment 1278 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Owen Leonard 2011-05-18 14:08:55 UTC
This bug still exists in master.
Comment 2 Owen Leonard 2011-05-18 14:16:57 UTC
The query which pulls information for the reading history:

SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp 
  FROM issues 
  LEFT JOIN items on items.itemnumber=issues.itemnumber
  LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
  LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
  WHERE borrowernumber=? 
  UNION ALL
  SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp 
  FROM old_issues 
  LEFT JOIN items on items.itemnumber=old_issues.itemnumber
  LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
  LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
  WHERE borrowernumber=? 
  order by $order

Add " AND old_issues.itemnumber IS NOT NULL" ?
Comment 3 Owen Leonard 2011-05-18 14:24:58 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2011-05-28 21:14:11 UTC
Created attachment 4288 [details] [review]
Signed-off patch

Before applying the patch: Deleting an item leaves a hole in the reading history - as pictured in attachment 1278 [details]. 

After applying the patch: The deleted item is not displayed at all in the reading history, neither in the staff client nor in the "my summary" page of the user in question in the OPAC. This goes for both items that were deleted before and after the patch was applied. 

Signing off!
Comment 5 Sharon Moreland 2011-05-31 14:46:55 UTC
As a patron, I would question any apparent 'holes' in my reading history.  It doesn't matter to me that the Library weeded a book I read - I want a record of every item I read to remain.  Is it possible to retain a brief title, similar to what appears in the Fines table?
Comment 6 Ian Walls 2011-07-08 19:36:15 UTC
Simple SQL query change, easy to read, marking as Passed QA.

A more robust solution for keeping reading history after an item is deleted is welcome, but this patch cures a graphic inconsistency in the current implementation.
Comment 7 Chris Cormack 2011-07-10 08:19:03 UTC
Pushed, please test
Comment 8 Mickey Coalwell 2012-11-19 19:14:59 UTC
http://ticket.bywatersolutions.com/show_bug.cgi?id=6421


Nicole suggested I comment on this bug. I see Sharon was in the loop for this development work last year, but it doesn't look her concerns were addressed in any way.


I have the same concerns, and am wondering if this patch could become a Koha preference rather than a default setting. 

Here is a member library explaining the situation, and making a case for the previous behavior:
****************************************************************************
I have a question about the circulation history. I thought it used to be if we
deleted an item and then looked up the circ history of a patron who had
previously checked said item out there would be an entry with dates but no
title/barcode, etc. While it may not have been functionally perfect, we miss
that feature. Lately we've noticed any items that are deleted in KOHA also are
wiped clean from the circ history as if they've never checked it out. The
little bit of info that used to be there was useful to us to see when an item
(even without title/barcode, etc) was checked out, due, etc. just in case we
had to fine the patron. There is not much useful info on fined items once they
have been deleted.

Would there be a possibility in a future upgrade or something of KOHA to keep
the info in the circ history even after the item has been deleted?

Also, patrons who accrued LOST ITEM fines in the past who used to have a line
in their fine history of something we deleted (listing dates but no
titles/links) no longer have that line included. Not good news in our opinion.
******************************************************************************
Thanks for your attention,
Mickey
Comment 9 Liz Rea 2012-11-19 20:39:30 UTC
Catalyst is working on filling in the reading record with titles from deleted items for Horowhenua District Council. That work is being followed on bug 8483, which I will add here as a "see also."
Comment 10 Chris Cormack 2013-04-22 10:21:10 UTC
Released in 3.10.0