Bug 26868 - biblio and biblio_metadata tables timestamp do not update when moving an item
Summary: biblio and biblio_metadata tables timestamp do not update when moving an item
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-29 17:28 UTC by Addie
Modified: 2023-12-09 13:27 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
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 Addie 2020-10-29 17:28:54 UTC
If you move an item from one biblio record to another, neither of the biblio nor biblio_metadata tables timestamps' are updated. Only the timestamp on the item that moves is updated. It would incredibly useful if at least the timestamp on the biblio record the item is moving away from updates. This would be super helpful for making sure records in Aspen Discovery are being updated properly. 

You can test this by going to a bib record and adding an item. If you then look at the timestamp in the biblio or biblio_metadata tables for the original bib record and new bib record, they will not be altered
Comment 1 AspenCat Team 2020-10-29 20:04:13 UTC
This would be very useful to our libraries.  Without this working, there isn't a good way to track moving one item from a record to another record. - Bob Bennhoff
Comment 2 Katrin Fischer 2020-11-01 00:46:22 UTC
I can understand the use case, but I feel like it would be giving wrong information somehow to update the timestamp on the record level without an actual change to the record. 

For example it would create extra updates over our API to the union catalog, where we don't transfer items, but only record changes. That probably would not be that many, but it might be worth seeing if we can figure out a different way to  make the 'remove' of items known. 

How does Aspen Discovery get the record information from Koha, OAI-PMH?
How does it deal with deleted items?
Comment 3 Mark Noble 2020-11-02 13:37:52 UTC
Aspen Discovery is using an ODBC connection to the database to determine what records and items have changed by looking at the biblio timestamp, biblio_metadata timestamp, items timestamp.  To determine which bibs and items have been deleted it looks at deleteditems and deletedbiblio. 

When an item has been moved to another bib, we can detect that it is changed, but we only know the new bib number, not the old bib number.  So there is not an easy way to determine that the old bib record also needs to be updated to not include the item.  

Because items are part of the bib record, we feel it is appropriate to update the timestamp for the old bib record when the item is moved. If that turns out to not be appropriate, we would suggest creating another timestamp for when items within the biblio are created, or deleted so we can detect changes to the contents of the record.
Comment 4 Katrin Fischer 2023-12-09 13:27:45 UTC
I think there is work underway to log biblio record merges, maybe we could also create a specific log entry for moving items?