Bugzilla – Attachment 100687 Details for
Bug 24809
OAI PMH can fail on fetching deleted records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24809: Get only timestamp of deleted items attached to existing bibs when check if bib deleted
Bug-24809-Get-only-timestamp-of-deleted-items-atta.patch (text/plain), 2.05 KB, created by
Nick Clemens (kidclamp)
on 2020-03-13 15:56:36 UTC
(
hide
)
Description:
Bug 24809: Get only timestamp of deleted items attached to existing bibs when check if bib deleted
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-03-13 15:56:36 UTC
Size:
2.05 KB
patch
obsolete
>From 4012dcce9762b07711857cf84330228421b3211f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 5 Mar 2020 10:59:22 +0000 >Subject: [PATCH] Bug 24809: Get only timestamp of deleted items attached to > existing bibs when check if bib deleted > >To test: > 1 - Edit/create a file in the koha home dir '/var/lib/koha/{instance}/OAI.yaml' with content like below: >format: > marcxml: > metadataPrefix: marcxml > metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim > schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd > include_items: 1 > 2 - Set the systempreferences below to indicated values: > OAI-PMH => Enable > OAI-PMH:ConfFile => /var/lib/koha/{instace}/OAI.yaml > 3 - View a record with items and confirm the items show: > http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=KOHA-OAI-TEST:4 > 4 - Delete the items, then delete the record > 5 - Reload the URL from step 3 > 6 - Internal Server Error: > Empty String at /kohadevbox/koha/Koha/OAI/Server/Record.pm line 58. > at /usr/share/perl/5.24/Carp.pm line 167 > 7 - Apply patch > 8 - restart_all > 9 - Repeat >10 - Reload URL from step 3 >11 - Success > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > Koha/OAI/Server/GetRecord.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/OAI/Server/GetRecord.pm b/Koha/OAI/Server/GetRecord.pm >index d4870e3887..a6fa42814b 100644 >--- a/Koha/OAI/Server/GetRecord.pm >+++ b/Koha/OAI/Server/GetRecord.pm >@@ -44,9 +44,10 @@ sub new { > my @bind_params = ($biblionumber); > if ( $items_included ) { > # Take latest timestamp of biblio and any items >+ # Or timestamp of deleted items where bib not deleted > $sql .= " > UNION >- SELECT timestamp from deleteditems >+ SELECT deleteditems.timestamp FROM deleteditems JOIN biblio USING (biblionumber) > WHERE biblionumber=? > UNION > SELECT timestamp from items >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24809
:
100178
|
100317
|
100687
|
101066
|
101067