Created attachment 3051 [details]
imported from oclc
When you search on Z39.50 and use OCLC as your target it brings in 952 fields (aka holdings) from other libraries. Z search should either offer an option (like marc import) or ignore all holdings fields when importing. This can be done with a sys pref and/or an option the Z search form.
The discussion on IRC can be read below.
[08:58] <nengard> is the z search in acq different from the one in cataloging? I have a report that the acq z search is pulling in 952 fields but i've never seen the cataloging one do that
[08:59] <kf> nengard: the forms are differnt - I added some missing options. And you can define a framework- not sure about other differences
[09:06] <slef> kf: koha jone or another one?
[09:08] <jcamins> nengard: I just realized what it is.
[09:08] <jcamins> OCLC.
[09:09] <nengard> oh!!!!!!!!
[09:09] <jcamins> I remember deleting those fields at Princeton, too.
[09:10] <slef> jcamins: always?
[09:10] <jcamins> slef: well, we always did at Princeton.
[09:10] <jcamins> Maybe some people keep them.
[09:10] <slef> jcamins: as in OCLC always send 9xx fields?
[09:10] <jcamins> I think so.
[09:11] <slef> bleah, I hope that's documented
[09:11] * slef browses http://www.oclc.org/
[09:11] <slef> http://www.oclc.org/support/documentation/z3950/search_IRs/#952structure
[09:12] <nengard> ICK
[09:12] <nengard> but good that it's documented
[09:12] <slef> so OCLC users need to configure Koha to use something else?
[09:12] <slef> Someone told me why Koha uses 952 but I forget.
[09:12] <nengard> i have a theory .... but it's not a nice one :)
[09:13] <slef> nengard: what's yours? Mine is 852 => 952
[09:14] <slef> Should koha's z search warn and offer to discard if it sees a biblio/items mapped field in results?
[09:14] * Nate_ has quit (Quit: Nate_)
[09:14] * tcohen (~firstname.lastname@example.org) has joined #koha
[09:15] <jcamins> slef: because 952 is used for local holdings by OCLC.
[09:15] * Nate_ (~email@example.com) has joined #koha
[09:16] <nengard> slef the marc import lets you ignore holdings - so i think the z search should too
[09:16] <nengard> maybe a sys pref or a checkbox on the z search page (don't import 952)
[09:17] <nengard> i'll start a report for this and include the chat
Created attachment 3473 [details] [review]
Initial patch that removes all 952 fields in records from Z39.50 for new acquisitions
This bug can cause another problem, more severe this time :
We have two Koha instances sharing records via Z39.50. When we create a new acquisition in Koha1 using a record fetched from Koha2, the items of the record are also imported.
Later, if we want to delete the items that were added incorrectly, the itemnumber used for deletion is the itemnumber from Koha2, so items are deleted randomly in the Koha1 instance.
Also, if the item that was imported was on loan, it can't be deleted because it is still considered as "on loan" on Koha1.
I attached a simple patch that deletes all the 952 fields from the record when importing it from z39.50 for acquisitions. This way, the problems can be prevented.
Created attachment 4102 [details] [review]
Simple patch, pushed please test