Koha ISSN search

By default koha (2.2.5) does not implement Z3950 search based on data entered in the ISSN field in the import MARC page. This is a simple way of adding this functionality:

Here is the list of data parameters transfers:

  • the PopupZ3950() javascript function calls the search.pl with parameters
  • the  intranet/cgi-bin/z3950/search.pl function takes the parameters and uses the intranet/modules/C4/Z3950.pm module to store a search in the database
  • the intranet/scripts/processZ3950queue daemon monitors the database and performs the actual search.

The search.pl receives the ISSN parameter but does not use it, you need to make the following modification:

unless ($random) { # if random is a parameter => we're just waiting for the search to end, it's a refresh.
if ($isbn) {
$random =rand(1000000000);
$errmsg = addz3950queue($isbn, "isbn", $random, 'CHECKED');
} elsif ($author) {
$random =rand(1000000000);
$errmsg = addz3950queue($author, "author", $random, 'CHECKED');
} elsif ($title) {
$random =rand(1000000000);
$errmsg = addz3950queue($title, "title", $random, 'CHECKED');
#len from here
elsif ($issn) {
$random =rand(1000000000);
$errmsg = addz3950queue($issn, "issn", $random, 'CHECKED');
#len until here

There is no need to worry about the database since it does not care what string it is in the “type” field.

Now modify the processZ3950queue to search for the ISSN field (@attr 1=8):

if ($type eq 'isbn') {
} elsif ($type eq 'title') {
} elsif ($type eq 'author') {
} elsif ($type eq 'lccn') {
} elsif ($type eq 'keyword') {
#len from here
elsif ($type eq 'issn') {
#len until here

Now it should work.

Leave a Reply