Bugzilla – Attachment 121822 Details for
Bug 8280
SRU should be filterable by Koha Item Type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8280: Add koha set and item fields to pqf.properties
Bug-8280-Add-koha-set-and-item-fields-to-pqfproper.patch (text/plain), 4.18 KB, created by
Nick Clemens
on 2021-06-11 12:22:06 UTC
(
hide
)
Description:
Bug 8280: Add koha set and item fields to pqf.properties
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2021-06-11 12:22:06 UTC
Size:
4.18 KB
patch
obsolete
>From 1a3a6192daa241e735cd7b9fcf26bfb3ac0cd386 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 11 Jun 2021 12:15:35 +0000 >Subject: [PATCH] Bug 8280: Add koha set and item fields to pqf.properties > >This patch adds a 'koha' set to the pqf properties and maps some basic >koha fields to all for searchign > >To test: >1 - Apply patch >2 - cp etc/z3950/pqf.properties /etc/koha/sites/kohadev/z3950/pqf.properties >3 - sudo koha-z3950-responder --restart kohadev >4 - Test a search: > curl -XGET "http://localhost:2100/biblios?version=1.1&operation=searchRetrieve&query=koha.itemtype=BK&maximumRecords=60&recordSchema=marcxml" >5 - Test other fields added: > koha.withdrawn > koha.lost > koha.classification-source > koha.materials-specified > koha.damaged > koha.restricted > koha.cn-sort > koha.notforloan > koha.ccode > koha.itemnumber > koha.homebranch > koha.holdingbranch > koha.location > koha.barcode > koha.onloan > koha.itemtype >--- > catalogue/itemsearch.pl | 10 +++++++--- > etc/z3950/pqf.properties | 20 ++++++++++++++++++++ > 2 files changed, 27 insertions(+), 3 deletions(-) > >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index f5f66fe349..bebea69839 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -26,6 +26,7 @@ use C4::Output; > use C4::Items; > use C4::Biblio; > use C4::Koha; >+use Carp::Always; > > use Koha::AuthorisedValues; > use Koha::Biblios; >@@ -89,6 +90,8 @@ if (defined $format and $format eq 'json') { > die "Unsupported format $format"; > } > >+warn "Template is $template_name"; >+ > my ($template, $borrowernumber, $cookie) = get_template_and_user({ > template_name => $template_name, > query => $cgi, >@@ -96,6 +99,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ > flagsrequired => { catalogue => 1 }, > }); > >+warn Data::Dumper::Dumper($template->unblessed); > my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.itemlost', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); > my $itemlost_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_value) : []; > >@@ -254,10 +258,10 @@ if (scalar keys %params > 0) { > $template->param(sEcho => scalar $cgi->param('sEcho')); > output_with_http_headers $cgi, $cookie, $template->output, 'json'; > } >- >+warn "exiting"; > exit; > } >- >+warn "exited"; > # Display the search form > > my @branches = map { value => $_->branchcode, label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } ); >@@ -309,5 +313,5 @@ $template->param( > items_search_fields => \@items_search_fields, > authorised_values_json => to_json($authorised_values), > ); >- >+warn "the end"; > output_html_with_http_headers $cgi, $cookie, $template->output; >diff --git a/etc/z3950/pqf.properties b/etc/z3950/pqf.properties >index 55919ee202..ebb2ff1f34 100644 >--- a/etc/z3950/pqf.properties >+++ b/etc/z3950/pqf.properties >@@ -15,6 +15,7 @@ set.cql = info:srw/cql-context-set/1/cql-v1.1 > set.rec = info:srw/cql-context-set/2/rec-1.0 > set.dc = info:srw/cql-context-set/1/dc-v1.1 > set.bath = http://zing.z3950.org/cql/bath/2.0/ >+set.koha = https://wiki.koha-community.org/wiki/Making_more_indexes_searchable_with_Zebra_SRU > > # default set (in query) > set = info:srw/cql-context-set/1/dc-v1.1 >@@ -160,3 +161,22 @@ index.bath.geographicName = 1=58 > index.bath.notes = 1=63 > index.bath.topicalSubject = 1=1079 > index.bath.genreForm = 1=1075 >+ >+# Koha specific indexes >+ >+index.koha.withdrawn = 1=8001 >+index.koha.lost = 1=8002 >+index.koha.classification-soruce = 1=8003 >+index.koha.materials-specified = 1=8004 >+index.koha.damaged = 1=8005 >+index.koha.restricted = 1=8006 >+index.koha.cn-sort = 1=8007 >+index.koha.notforloan = 1=8008 >+index.koha.ccode = 1=8009 >+index.koha.itemnumber = 1=8010 >+index.koha.homebranch = 1=8011 >+index.koha.holdingbranch = 1=8012 >+index.koha.location = 1=8013 >+index.koha.barcode = 1=8023 >+index.koha.onloan = 1=8024 >+index.koha.itemtype = 1=8031 >-- >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 8280
:
121822
|
122009
|
122082
|
122099
|
122100
|
122101