Summary: | When item is deleted, title disappears from reading history creating a useless entry | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | OPAC | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, jonathan.druart, lisette |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33948 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 40704: Display 'item deleted' in checkout history
Patron history in 24.05 Bug 40704: DB changes Bug 40704: DBIC schema changes Bug 40704: Store and display deleted item for checkouts |
Description
Katrin Fischer
2025-08-26 12:29:21 UTC
Is this a regression? What do you expect? BTW it's the same on the staff interface. We ran into this because of our cover service exploding when there was no biblionumber when preparing for the update, so I believe it's tied to a change between 22.11 and 24.11. I think it could be changes relating to showing deleted entries, where we just didn't show them before, but couldn't dig much deeper than finding these bugs: Bug 3397 - Deleting item record leaves a hole in patron's reading history Bug 33948 - Replace GetAllIssues with Koha::Checkouts - staff I suspect the second bug (23.11), but didn't confirm. I have patched locally to remove entries without biblionumber - an empty line has no usable information. The star ratings shown are broken etc. Ideally we should pull the information from the deleted tables, if not possible, we should not show the entries. (In reply to Katrin Fischer from comment #2) > Ideally we should pull the information from the deleted tables, if not > possible, we should not show the entries. It's not possible, old_issues.itemnumber is always null in this case CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, Don’t you think it’s better to show an "empty" line indicating that the item has been deleted, rather than omitting it entirely (which would distort the total number of checkouts)? Created attachment 186717 [details] [review] Bug 40704: Display 'item deleted' in checkout history Instead of an empty line we can show that the item has been deleted. I was going to submit another version which would remove the checkouts with deleted item but then remembered this: """ Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff However there is one change! And it's a bug fix (or an enhancement, it depends on how you see things). It includes checkouts with deleted items, which is a long standing bug (see bug 8483). """ I've tried 'td colspan="5"' for the staff table, but DT does not allow it. https://datatables.net/manual/installation#HTML """ Please also note that while DataTables supports colspan and rowspan in the table's header and footer, they are not supported in the table's tbody and must not be present. """ Hi Joubu, thanks for having a look! If I understand correctly, we would now show that the item has been deleted. But that might just leave a long list of deleted entries - is it really useful for the end user? It also bugs me a bit that we rely on the item instead of the record. If one of 20 copies is replaced for wear, you will already have a hole in your reading history, although the record is still there. (In reply to Jonathan Druart from comment #3) > (In reply to Katrin Fischer from comment #2) > > Ideally we should pull the information from the deleted tables, if not > > possible, we should not show the entries. > > It's not possible, old_issues.itemnumber is always null in this case > > CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` > (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, > > Don’t you think it’s better to show an "empty" line indicating that the item > has been deleted, rather than omitting it entirely (which would distort the > total number of checkouts)? If the users delete their reading history or the library does, the number might not be so reliable anyway. I think a note at the top would be more useful then: Note: X items on your list are no longer available at the library. The dates might provide useful info as well. (In reply to Jonathan Druart from comment #9) > It's really something people have asked for years, see the bug 8483 and bug > 3397. I agree, but I think they really wanted to see what is was :) I recently had this problem with a new client for whom we migrated the circulation history. I think they had done a lot of weeding before the migration and also we didn't migrate part of the collection which belonged to the school attached to the library. The result was a really long list of empty lines (I'll attach a censored screenshot). They told us to simply delete the NULL entries. They didn't really care for the numbers. At least not in the patron's reading history. What they really wanted was the history of a particular title for weeding purposes. But the many empty lines in the patron history was grating for them. I think the best case scenario would be to show the title, with no link. Kind of like what we do in acquisitions, I think? I understand that might not be possible with the current schema, but I think that's what would be most useful for the patron. Bar that, maybe filtering out the empty lines would be the next best? Like with an option to show all lines? Created attachment 186728 [details]
Patron history in 24.05
As promised, the screenshot. This was taken in production in 24.05, before I deleted all the empty lines.
Created attachment 186784 [details] [review] Bug 40704: DB changes Created attachment 186785 [details] [review] Bug 40704: DBIC schema changes Created attachment 186786 [details] [review] Bug 40704: Store and display deleted item for checkouts With the last patches we could retain the old_issues.itemnumber (in a separate column: deleted_itemnumber). What do you think? Please test and tell me if we continue (the patches are not ready for inclusion). Hi Joubu, that's awesome, thank you. I am not sure I will be able to test this week, but maybe it would be a good one for the German hackfest next week. |