[Koha-bugs] [Bug 19555] Some changes to records are not reflected in OAI-PMH

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 2 10:15:19 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19555

--- Comment #6 from Magnus Enger <magnus at libriotech.no> ---
Created attachment 68888
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68888&action=edit
Bug 19555: Some changes to records are not reflected in OAI-PMH

When we moved biblioitems.marcxml to biblio_metadata.metadata, this
meant that biblioteitems.timestamp was only updated when there
were changes to MARC fields that have corresponding columns in
the biblioitems table, like ISBN. This patch adds a timestamp
column to biblio_metadata and makes OAI-PMH use that to decide
if a record should be included in a response or not. This should
mean that any change to the records are reflected in OAI-PMH.

To test:
- Before applying the patch:
- Look at at the data in biblioitems for a record, e.g.:
  SELECT * FROM biblioitems WHERE biblionumber = x\G
- Edit the record, and verify that a change to e.g. ISBN updates
  the timestamp, and a change to e.g. a subject does not
- Apply the patch and make sure the atomicupdate is run
- Look at the data in biblio_metadata for the record. e.g.:
  SELECT * FROM biblio_metadata WHERE biblionumber = x\G
- Verify that any change to the record results in a change to
  the timestamp
- Enable OAI-PMH with the OAI-PMH syspref
- Visit this URL in your browser:
 
<opac>/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml&from=2017-10-26&until=2017-11-02
- Change the from and until dates as well as the
  biblio_metadata.timestamp value (e.g.: UPDATE biblio_metadata
  SET timestamp = '2017-10-24' WHERE biblionumber = x), and verify
  that the record is included or not included in the OAI-PMH
  response as expected
- Run the tests: prove t/db_dependent/OAI/*.t

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list