https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 --- Comment #4 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 206969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206969&action=edit Bug 41664: Update OAI modification date of record A when an item moves to record B Moving an item away to another record did not update that date for the source record, even though external harvesters rely on it to detect changes. Deleting an item already moves the record's OAI datestamp forward, through deleteditems.timestamp. Moving an item only bumps items.timestamp, which now belongs to record B, so record A's datestamp stays unchanged. This patch explicitly stamps biblio_metadata.timestamp of the source record. Test plan: 0. Prerequisite: the OAI-PMH:ConfFile must define a format with "include_items: 1", otherwise item changes never affect the OAI datestamp, with or without this patch. Enable OAI-PMH. 1. Before applying the patch, note record A's OAI datestamp (GetRecord via opac/oai.pl or oai.pl) and delete one of its items. Confirm the datestamp moves forward. 2. Move another item from A to B (cataloguing/moveitem.pl). Confirm A's datestamp does NOT change, B's does (the bug). 3. Apply the patch and restart the plack services (restart_all). 4. Note A's datestamp again, e.g. with SELECT timestamp FROM biblio_metadata WHERE biblionumber = <A>; as well as the GetRecord output. 5. Move another item from A to B. Confirm A's datestamp moved forward. Note: editing or deleting an item never changes biblio_metadata.timestamp, only the OAI datestamp computed from items and deleteditems, so check biblio_metadata only for the move case. 6. Confirm orders/holds/.. still transfer to B correctly. 7. prove t/db_dependent/Koha/Item.t Sponsored-by: BibLibre -- You are receiving this mail because: You are watching all bug changes.