From 2038e93aa68baaabe20a8b4218cfb0ed6fc5903c Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Wed, 25 Nov 2015 13:36:08 -0600 Subject: [PATCH] LP#1519925 - Allow MARC Federated Search to search UPC index of local catalog. If a organization added UPC search for certain Z39.50 servers then the UPC search box would display in the MARC Federated Search interface, but the local catalog would not be searched. This adds the ability to search the local catalog "Evergreen Catalog" UPC index from that interface. Confirm the Issue: 1. To trigger the initial problem you need a Z39.50 server setup that includes a UPC Search. For OCLC the following Z39.50 attributes add UPC searching. Name:upc, Label:UPC, Code:1007, Format:4, Truncation:0 2. Now the MARC Federated Search should include a UPC search option. Try searching for a UPC that exists in the local catalog. Nothing should come up. After patch applied: 1. Now if you search for a UPC in the MARC Federated Search that you know exists, it will show up. Signed-off-by: Josh Stompro Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm | 1 + Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 8de593b840..777ef7e50f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -1002,6 +1002,7 @@ sub cat_search_z_style_wrapper { $$searchhash{searches}{keyword}{term} = $$args{search}{keyword} if $$args{search}{keyword}; $$searchhash{searches}{'identifier|isbn'}{term} = $$args{search}{isbn} if $$args{search}{isbn}; $$searchhash{searches}{'identifier|issn'}{term} = $$args{search}{issn} if $$args{search}{issn}; + $$searchhash{searches}{'identifier|upc'}{term} = $$args{search}{upc} if $$args{search}{upc}; $$searchhash{searches}{keyword}{term} .= join ' ', $$searchhash{searches}{keyword}{term}, $$args{search}{tcn} if $$args{search}{tcn}; $$searchhash{searches}{keyword}{term} .= join ' ', $$searchhash{searches}{keyword}{term}, $$args{search}{publisher} if $$args{search}{publisher}; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm index a5a4f6c9c4..cff8c6ffe3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm @@ -194,6 +194,7 @@ sub fetch_service_defs { publisher => {code => 'publisher', label => 'Publisher'}, pubdate => {code => 'pubdate', label => 'Pub Date'}, item_type => {code => 'item_type', label => 'Item Type'}, + upc => {code => 'upc', label => 'UPC'}, } }; -- 2.43.2