https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44155
Bug ID: 44155
Summary: Z39.50 responder with Elasticsearch adds one more item
status subfield each time a record is fetched again
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Z39.50 / SRU / OpenSearch Servers
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Target Milestone: ---
With Elasticsearch, the Z39.50 responder started with --add-item-status adds
one more status subfield to the item fields each time the same record of the
same result set is fetched.
Koha::Z3950Responder::GenericSession->fetch_record keeps the MARC::Record
objects of the result set in cached_results (20 records prefetched by default),
and C4::Search::new_record_from_zebra returns them as they are with
Elasticsearch. fetch_handler then calls add_item_status on the item fields of
the cached object itself, so the status subfield stays in the cache.
To reproduce (Elasticsearch):
1. perl misc/z3950_responder.pl --add-item-status=k tcp:@:9998
2. With yaz-client:
open tcp:localhost:9998/biblios
format xml
elements marcxml
find @attr 1=12 <biblionumber of a record with an available item>
show 1
=> 952 $k Available
3. Without closing yaz-client, mark the item as damaged and run "show 1" again
=> 952 $k Available $k Damaged
The first status is no longer true, and without --add-status-multi-subfield
there should be only one status subfield. A new search returns only $k Damaged.
Zebra is not affected, because ZebraSession builds the record again from the
XML on each fetch.
This also affects clients that fetch the records of a result set again (paging
back, or showing the records again).
Found while testing bug 43943.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/