[Bug 41664] New: Moving an item from record A to record B should update OAI modification date of record A
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 Bug ID: 41664 Summary: Moving an item from record A to record B should update OAI modification date of record A Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: mathsabypro@gmail.com QA Contact: testopia@bugs.koha-community.org Deleting an item from a record updates the modification date of the record's header in OAI-PMH repository. But moving an item from record A to record B does not currently update that date. It should be, as we are resting on that piece of information to pass on the changes to external systems harvesting Koha. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 --- Comment #1 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 204745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204745&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. Test plan: 1. Apply the patch 2. prove t/db_dependent/Koha/Item.t 3. Note record A's OAI datestamp (SELECT timestamp FROM biblio_metadata WHERE biblionumber = <A>, or GetRecord via svc/oai.pl), move an item from A to B, confirm A's datestamp moved forward. 4. Confirm orders/holds/.. still transfer to B correctly. Sponsored-by: BibLibre -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thibaud.guillot@biblibre.co | |m Assignee|koha-bugs@lists.koha-commun |thibaud.guillot@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 --- Comment #2 from Mathieu Saby <mathsabypro@gmail.com> --- I tried it in k-t-d. It doesn't work. the timestamp for 'biblio_metadata' is not updated, nor the date in the OAI display of the record. But the timestamp also is not updated if you modify or delete an item ! Is there a preference I need to enable? Or is something broken in Koha? I ran the test again after enabling the preferences OAI-PMH, OAI-PMH:AutoUpdateSets, and OAI-PMH:AutoUpdateSetsEmbedItemData, but it didn't make any difference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 Mathieu Saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 --- Comment #3 from Mathieu Saby <mathsabypro@gmail.com> --- I have just tried in a sandbox, and I note the same general issue : no action on the item seems to trigger the update. Maybe I'm going about this the wrong way, but could you check to see if there's a general issue on main code ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |BibLibre list of Sponsors| | Status|Failed QA |Needs Signoff Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204745|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41664 --- Comment #5 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Thanks for testing, and sorry, the test plan was not clear enough. I amended the commit message with this test plan. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org