Bugzilla – Attachment 7694 Details for
Bug 5337
In Acquisition, EAN search will return results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-5337-EAN-management-Adds-ean-for-various-searche.patch (text/plain), 36.05 KB, created by
Matthias Meusburger
on 2012-02-16 16:31:59 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2012-02-16 16:31:59 UTC
Size:
36.05 KB
patch
obsolete
>From b521b2bf87801952a8391c94ae0b8967ba723241 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Mon, 16 Jan 2012 14:47:26 +0100 >Subject: [PATCH] Bug 5337: EAN management : Adds ean for various searches > > - in various acquisition pages and serials home > - in database : biblioitems.ean > - adds ean and its mapping in default english bibliographic framework > - adds ean mapping in default french bibliographic framework > - ean search is not enabled for MARC21 >--- > C4/Acquisition.pm | 26 +++++++++++++------- > C4/Biblio.pm | 9 ++++-- > C4/Serials.pm | 20 +++++++++++++-- > acqui/addorder.pl | 1 + > acqui/histsearch.pl | 3 ++ > acqui/neworderempty.pl | 3 ++ > acqui/parcel.pl | 10 ++++--- > catalogue/detail.pl | 2 +- > .../mysql/atomicupdate/02.00.060-adding-ean.pl | 7 +++++ > .../mandatory/unimarc_framework_DEFAULT.sql | 2 + > .../Obligatoire/framework_DEFAULT.sql | 2 +- > installer/data/mysql/kohastructure.sql | 2 + > installer/data/mysql/updatedatabase.pl | 9 +++++++ > .../prog/en/includes/serials-search.inc | 13 ++++++++- > .../prog/en/modules/acqui/histsearch.tt | 3 ++ > .../prog/en/modules/acqui/neworderempty.tt | 11 ++++++++ > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 11 +++++++- > kohaversion.pl | 22 ++++++---------- > opac/opac-ISBDdetail.pl | 2 +- > opac/opac-detail.pl | 5 ++- > serials/checkexpiration.pl | 1 + > serials/claims.pl | 1 + > serials/routing-preview.pl | 1 + > serials/routing.pl | 2 + > serials/serial-issues.pl | 1 + > serials/serials-collection.pl | 1 + > serials/serials-edit.pl | 2 + > serials/serials-home.pl | 19 ++++++++------ > serials/serials-recieve.pl | 1 + > serials/subscription-add.pl | 2 + > serials/subscription-detail.pl | 1 + > serials/viewalerts.pl | 4 ++- > 32 files changed, 148 insertions(+), 51 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/02.00.060-adding-ean.pl > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 7127f24..f3065c3 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -1159,7 +1159,7 @@ C<@results> is an array of references-to-hash with the following keys: > > sub SearchOrder { > #### -------- SearchOrder------------------------------- >- my ($ordernumber, $search, $supplierid, $basket) = @_; >+ my ( $ordernumber, $search, $ean, $supplierid, $basket ) = @_; > > my $dbh = C4::Context->dbh; > my @args = (); >@@ -1179,7 +1179,11 @@ sub SearchOrder { > $query .= " AND (biblio.title like ? OR biblio.author LIKE ? OR biblioitems.isbn like ?)"; > push @args, ("%$search%","%$search%","%$search%"); > } >- if($supplierid){ >+ if ($ean) { >+ $query .= " AND biblioitems.ean = ?"; >+ push @args, $ean; >+ } >+ if ($supplierid) { > $query .= "AND aqbasket.booksellerid = ?"; > push @args, $supplierid; > } >@@ -1533,12 +1537,12 @@ sub GetHistory { > my $title = $params{title}; > my $author = $params{author}; > my $isbn = $params{isbn}; >+ my $ean = $params{ean}; > my $name = $params{name}; > my $from_placed_on = $params{from_placed_on}; > my $to_placed_on = $params{to_placed_on}; > my $basket = $params{basket}; > my $booksellerinvoicenumber = $params{booksellerinvoicenumber}; >- > my @order_loop; > my $total_qty = 0; > my $total_qtyreceived = 0; >@@ -1550,12 +1554,13 @@ sub GetHistory { > biblio.title, > biblio.author, > biblioitems.isbn, >+ biblioitems.ean, > aqorders.basketno, >- aqbasket.basketname, >- aqbasket.basketgroupid, >- aqbasketgroups.name as groupname, >+ aqbasket.basketname, >+ aqbasket.basketgroupid, >+ aqbasketgroups.name as groupname, > aqbooksellers.name, >- aqbasket.creationdate, >+ aqbasket.creationdate, > aqorders.datereceived, > aqorders.quantity, > aqorders.quantityreceived, >@@ -1566,7 +1571,7 @@ sub GetHistory { > aqorders.biblionumber > FROM aqorders > LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno >- LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id >+ LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id > LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id > LEFT JOIN biblioitems ON biblioitems.biblionumber=aqorders.biblionumber > LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber"; >@@ -1593,7 +1598,10 @@ sub GetHistory { > $query .= " AND biblioitems.isbn LIKE ? "; > push @query_params, "%$isbn%"; > } >- >+ if ( defined $ean and $ean ) { >+ $query .= " AND biblioitems.ean = ? "; >+ push @query_params, "$ean"; >+ } > if ( $name ) { > $query .= " AND aqbooksellers.name LIKE ? "; > push @query_params, "%$name%"; >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index ac78ae3..233089f 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -3394,7 +3394,8 @@ sub _koha_modify_biblioitem_nonmarc { > cn_item = ?, > cn_suffix = ?, > cn_sort = ?, >- totalissues = ? >+ totalissues = ?, >+ ean = ? > where biblioitemnumber = ? > "; > my $sth = $dbh->prepare($query); >@@ -3406,6 +3407,7 @@ sub _koha_modify_biblioitem_nonmarc { > $biblioitem->{'pages'}, $biblioitem->{'bnotes'}, $biblioitem->{'size'}, $biblioitem->{'place'}, > $biblioitem->{'lccn'}, $biblioitem->{'url'}, $biblioitem->{'biblioitems.cn_source'}, $biblioitem->{'cn_class'}, > $biblioitem->{'cn_item'}, $biblioitem->{'cn_suffix'}, $cn_sort, $biblioitem->{'totalissues'}, >+ $biblioitem->{'ean'}, > $biblioitem->{'biblioitemnumber'} > ); > if ( $dbh->errstr ) { >@@ -3457,7 +3459,8 @@ sub _koha_add_biblioitem { > cn_item = ?, > cn_suffix = ?, > cn_sort = ?, >- totalissues = ? >+ totalissues = ?, >+ ean = ? > "; > my $sth = $dbh->prepare($query); > $sth->execute( >@@ -3468,7 +3471,7 @@ sub _koha_add_biblioitem { > $biblioitem->{'pages'}, $biblioitem->{'bnotes'}, $biblioitem->{'size'}, $biblioitem->{'place'}, > $biblioitem->{'lccn'}, $biblioitem->{'marc'}, $biblioitem->{'url'}, $biblioitem->{'biblioitems.cn_source'}, > $biblioitem->{'cn_class'}, $biblioitem->{'cn_item'}, $biblioitem->{'cn_suffix'}, $cn_sort, >- $biblioitem->{'totalissues'} >+ $biblioitem->{'totalissues'}, $biblioitem->{'ean'} > ); > my $bibitemnum = $dbh->{'mysql_insertid'}; > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 1471184..f7039a3 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -551,15 +551,15 @@ sub GetFullSubscriptionsFromBiblionumber { > > =head2 GetSubscriptions > >-@results = GetSubscriptions($title,$ISSN,$biblionumber); >-this function gets all subscriptions which have title like $title,ISSN like $ISSN and biblionumber like $biblionumber. >+@results = GetSubscriptions($title,$ISSN,$ean,$biblionumber); >+this function gets all subscriptions which have title like $title,ISSN like $ISSN,EAN like $ean and biblionumber like $biblionumber. > return: > a table of hashref. Each hash containt the subscription. > > =cut > > sub GetSubscriptions { >- my ( $string, $issn, $biblionumber ) = @_; >+ my ( $string, $issn, $ean, $biblionumber ) = @_; > > #return unless $title or $ISSN or $biblionumber; > my $dbh = C4::Context->dbh; >@@ -603,6 +603,20 @@ sub GetSubscriptions { > } > $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))"; > } >+ if ($ean) { >+ my @sqlstrings; >+ my @strings_to_search; >+ @strings_to_search = map { "$_" } split( / /, $ean ); >+ foreach my $index qw(biblioitems.ean) { >+ push @bind_params, @strings_to_search; >+ my $tmpstring = "OR $index = ? " x scalar(@strings_to_search); >+ $debug && warn "$tmpstring"; >+ $tmpstring =~ s/^OR //; >+ push @sqlstrings, $tmpstring; >+ } >+ $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")"; >+ } >+ > $sql .= "$sqlwhere ORDER BY title"; > $debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params ); > $sth = $dbh->prepare($sql); >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 121d20d..31b1701 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -202,6 +202,7 @@ if ( $orderinfo->{quantity} ne '0' ) { > "biblio.author" => $$orderinfo{author} ? $$orderinfo{author} : "", > "biblio.seriestitle" => $$orderinfo{series} ? $$orderinfo{series} : "", > "biblioitems.isbn" => $$orderinfo{isbn} ? $$orderinfo{isbn} : "", >+ "biblioitems.ean" => $$orderinfo{ean} ? $$orderinfo{ean} : "", > "biblioitems.publishercode" => $$orderinfo{publishercode} ? $$orderinfo{publishercode} : "", > "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "", > "biblio.copyrightdate" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "", >diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl >index ff68599..d953d5a 100755 >--- a/acqui/histsearch.pl >+++ b/acqui/histsearch.pl >@@ -63,6 +63,7 @@ my $title = $input->param( 'title'); > my $author = $input->param('author'); > my $isbn = $input->param('isbn'); > my $name = $input->param( 'name' ); >+my $ean = $input->param('ean'); > my $basket = $input->param( 'basket' ); > my $booksellerinvoicenumber = $input->param( 'booksellerinvoicenumber' ); > my $from_placed_on = $input->param('from'); >@@ -119,6 +120,7 @@ $template->param( > title => $title, > author => $author, > isbn => $isbn, >+ ean => $ean, > name => $name, > basket => $basket, > booksellerinvoicenumber => $booksellerinvoicenumber, >@@ -127,6 +129,7 @@ $template->param( > DHTMLcalendar_dateformat=> C4::Dates->DHTMLcalendar(), > dateformat => C4::Dates->new()->format(), > debug => $debug || $input->param('debug') || 0, >+ uc(C4::Context->preference("marcflavour")) => 1 > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 459dfe8..37b5002 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -378,6 +378,7 @@ $template->param( > publicationyear => $data->{'publicationyear'} ? $data->{'publicationyear'} : $data->{'copyrightdate'}, > budget_loop => $budget_loop, > isbn => $data->{'isbn'}, >+ ean => $data->{'ean'}, > seriestitle => $data->{'seriestitle'}, > itemtypeloop => \@itemtypes, > quantity => $data->{'quantity'}, >@@ -396,6 +397,7 @@ $template->param( > # CHECKME: gst-stuff needs verifing, mason. > gstrate => $bookseller->{'gstrate'} // C4::Context->preference("gist") // 0, > gstreg => $bookseller->{'gstreg'}, >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > > output_html_with_http_headers $input, $cookie, $template->output; >@@ -527,6 +529,7 @@ sub Load_Duplicate { > booksellerid => $basket->{'booksellerid'}, > breedingid => $params->{'breedingid'}, > duplicatetitle => $duplicatetitle, >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index c256c60..9779287 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -100,14 +100,15 @@ if($input->param('format') eq "json"){ > }); > > my @datas; >- my $search = $input->param('search') || ''; >+ my $search = $input->param('search') || ''; >+ my $ean = $input->param('ean') || ''; > my $supplier = $input->param('supplierid') || ''; > my $basketno = $input->param('basketno') || ''; > my $orderno = $input->param('orderno') || ''; > >- my $orders = SearchOrder($orderno, $search, $supplier, $basketno); >- foreach my $order (@$orders){ >- if($order->{quantityreceived} < $order->{quantity}){ >+ my $orders = SearchOrder($orderno, $search, $ean, $supplier, $basketno); >+ foreach my $order (@$orders) { >+ if ( $order->{quantityreceived} < $order->{quantity} ) { > my $data = {}; > > $data->{basketno} = $order->{basketno}; >@@ -311,6 +312,7 @@ $template->param( > totalPqtyrcvd => $totalPqtyrcvd, > totalPecost => sprintf("%.2f", $totalPecost), > resultsperpage => $resultsperpage, >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > output_html_with_http_headers $input, $cookie, $template->output; > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 3c95ba2..b6a9f89 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -139,7 +139,7 @@ my ( $holdcount, $holds ) = GetReservesFromBiblionumber($biblionumber,1); > > #coping with subscriptions > my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); >-my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber ); >+my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, undef, $biblionumber ); > my @subs; > > foreach my $subscription (@subscriptions) { >diff --git a/installer/data/mysql/atomicupdate/02.00.060-adding-ean.pl b/installer/data/mysql/atomicupdate/02.00.060-adding-ean.pl >new file mode 100644 >index 0000000..875ce76 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/02.00.060-adding-ean.pl >@@ -0,0 +1,7 @@ >+#!/usr/bin/perl >+use C4::Context; >+my $dbh= C4::Context->dbh; >+$dbh->do("ALTER TABLE `biblioitems` ADD `ean` VARCHAR( 13 ) NULL AFTER issn"); >+$dbh->do("CREATE INDEX `ean` ON biblioitems (`ean`) "); >+$dbh->do("ALTER TABLE `deletedbiblioitems` ADD `ean` VARCHAR( 13 ) NULL AFTER issn"); >+$dbh->do("CREATE INDEX `ean` ON deletedbiblioitems (`ean`) "); >diff --git a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql >index b3c0f4b..6540274 100644 >--- a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql >+++ b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql >@@ -166,6 +166,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat > ('022', 'Government Publication Number', 'Government Publication Number', 0, 0, '', ''), > ('040', 'CODEN (Serials)', 'CODEN (Serials)', 0, 0, '', ''), > ('071', 'Publisher\'s Number (Sound Recordings and Music)', '', 0, 0, '', ''), >+ ('073', 'EAN', 'EAN', 1, 0, '', ''), > ('100', 'General Processing Data', 'General Processing Data', 1, 0, '', ''), > ('101', 'Language of the Item', 'Language of the Item', 1, 0, '', ''), > ('102', 'Country of Publication or Production', 'Country of Publication or Production', 0, 0, '', ''), >@@ -356,6 +357,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` > ('040', 'z', 'Erroneous CODEN', 'Erroneous CODEN', 1, 0, '', 0, '', '', '', 0, -5, '', '', '', NULL), > ('071', 'a', 'Publisher\'s Number (Sound Recordings and Music)', 'Publisher\'s Number (Sound Recordings and Music)', 0, 0, '', 0, '', '', '', 0, -5, '', '', '', NULL), > ('071', 'b', 'Source', 'Source', 0, 0, '', 0, '', '', '', 0, -5, '', '', '', NULL), >+ ('073', 'a', 'EAN', 'EAN', 0, 0, 'biblioitems.ean', 0, '', '', '', 0, 0, '', '', '', NULL), > ('100', 'a', 'General Processing Data', 'General Processing Data', 0, 0, '', 1, '', '', 'unimarc_field_100.pl', 0, 0, '', '', '', NULL), > ('101', 'a', 'Language of the Text, Soundtrack, etc.', 'Language of the Text, Soundtrack, etc.', 1, 0, '', 1, 'LAN', '', '', 0, 0, '', '', '', NULL), > ('101', 'b', 'Language of Intermediate Text when Item is Not Translated from Original', 'Language of Intermediate Text when Item is Not Translated from Original', 0, 0, '', 1, '', '', '', 0, -5, '', '', '', NULL), >diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql >index ad8147d..df8834c 100644 >--- a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql >+++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql >@@ -318,7 +318,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` > ('072', 'c', 'Numéro additionnels suivant le code normalisé', '', 0, 0, '', 0, '', '', '', 0, 0, '', NULL, '', ''), > ('072', 'd', 'Mention de disponibilité et/ou de prix', '', 0, 0, '', 0, '', '', '', 0, 0, '', NULL, '', ''), > ('072', 'z', 'Numéro ou code erroné', '', 0, 0, '', 0, '', '', '', 0, 0, '', NULL, '', ''), >-('073', 'a', 'Numéro', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''), >+('073', 'a', 'Numéro', '', 0, 0, 'biblioitems.ean', 0, '', '', '', NULL, 0, '', '', NULL, ''), > ('073', 'b', 'Qualificatif', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''), > ('073', 'c', 'Numéros additionnels', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''), > ('073', 'd', 'Prix et disponibilité', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''), >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e53a74e..93a4af2 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -154,6 +154,7 @@ CREATE TABLE `biblioitems` ( -- information related to bibliographic records in > `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c) > `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a) > `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a) >+ `ean` varchar(13) default NULL, > `publicationyear` text, > `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b) > `volumedate` date default NULL, >@@ -618,6 +619,7 @@ CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t > `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c) > `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a) > `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a) >+ `ean` varchar(13) default NULL, > `publicationyear` text, > `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b) > `volumedate` date default NULL, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index a4ad03f..1114f81 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4605,6 +4605,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.07.00.008"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("ALTER TABLE `biblioitems` ADD `ean` VARCHAR( 13 ) NULL AFTER issn"); >+ $dbh->do("CREATE INDEX `ean` ON biblioitems (`ean`) "); >+ $dbh->do("ALTER TABLE `deletedbiblioitems` ADD `ean` VARCHAR( 13 ) NULL AFTER issn"); >+ $dbh->do("CREATE INDEX `ean` ON deletedbiblioitems (`ean`) "); >+ print "Upgrade to $DBversion done (Adding ean in biblioitems and deletedbiblioitems)\n"; >+ SetVersion($DBversion); >+} > > =head1 FUNCTIONS > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc >index 6787969..2ea5dc9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc >@@ -1,9 +1,18 @@ >- > <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Serials Resident Search Box --> > <div id="header_search"> > <div id="subscription_search" class="residentsearch"> > <p class="tip">Search Subscriptions:</p> >- <form action="/cgi-bin/koha/serials/serials-home.pl" method="get">[% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing %]" />[% END %]<input type="hidden" name="searched" value="1" /> <label for="ISSN_filter">ISSN:</label> <input type="text" size="10" maxlength="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter %]" /> <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter %]" /><input type="submit" value="Search" class="submit" /> >+ <form action="/cgi-bin/koha/serials/serials-home.pl" method="get"> >+ [% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing %]" />[% END %] >+ <input type="hidden" name="searched" value="1" /> >+ <label for="ISSN_filter">ISSN:</label> <input type="text" size="10" maxlength="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter %]" /> >+ >+[% UNLESS (MARC21) %] >+ <label for="EAN_filter">EAN:</label> <input type="text" size="20" maxlength="40" name="EAN_filter" id="EAN_filter" value="[% EAN_filter %]" /> >+[% END %] >+ <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter %]" /> >+ <input type="submit" value="Search" class="submit" /> >+ > </form> > </div> > [% INCLUDE 'patron-search-box.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index 9321cf9..64b8ad2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -22,6 +22,9 @@ > <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li> > <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li> > <li><label for="isbn">ISBN: </label> <input type="isbn" name="isbn" id="isbn" value="[% isbn %]" /></li> >+ [% UNLESS (MARC21) %] >+ <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li> >+ [% END %] > <li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li> > <li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li> > <li><label for="booksellerinvoicenumber ">Bookseller Invoice No: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index d58582e..d44d0f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -282,6 +282,17 @@ $(document).ready(function() > <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" /> > [% END %] > </li> >+ [% UNLESS (MARC21) %] >+ <li> >+ [% IF ( biblionumber ) %] >+ <span class="label">EAN: </span> >+ <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %] >+ [% ELSE %] >+ <label for="EAN">EAN: </label> >+ <input type="text" size="20" name="ean" id="EAN" value="[% ean %]" /> >+ [% END %] >+ </li> >+ [% END %] > <li> > [% IF ( biblionumber ) %] > <span class="label">Series: </span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index eb5492e..3a13d4e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -76,8 +76,9 @@ > var summaryStatus = jQuery.trim($("#summaryfilter").val()); > var basketStatus = $("#basketfilter").val(); > var orderStatus = $("#orderfilter").val(); >+ var eanStatus = $("#eanfilter").val() || ''; > >- if (summaryStatus == '' && basketStatus == '' && orderStatus == '') { clearFilters(); return false; } >+ if (summaryStatus == '' && basketStatus == '' && orderStatus == '' && eanStatus == '') { clearFilters(); return false; } > > var filtered = "table#pendingt tbody.filterclass tr"; > >@@ -118,7 +119,7 @@ > }catch(e){alert(e);} > } > } >- var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?supplierid=[% supplierid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&format=json', callback, null); >+ var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?supplierid=[% supplierid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&ean='+eanStatus+'&format=json', callback, null); > > return false; > } >@@ -407,6 +408,12 @@ > <label for="orderfilter">Order Line :</label> > <input type="text" name="orderfilter" id="orderfilter" /> > </li> >+ [% UNLESS (MARC21) %] >+ <li> >+ <label for="eanfilter">EAN :</label> >+ <input type="text" name="eanfilter" id="eanfilter" /> >+ </li> >+ [% END %] > </ol> > <fieldset class="action"> > <input type="submit" value="Filter" /> >diff --git a/kohaversion.pl b/kohaversion.pl >index 09b1ca2..a13579c 100644 >--- a/kohaversion.pl >+++ b/kohaversion.pl >@@ -1,22 +1,16 @@ > # the next koha public release version number; >- >-=head1 FUNCTIONS >- >-=head2 kohaversion >- >-the kohaversion is divided in 4 parts : >- - #1 : the major number. 3 atm >- - #2 : the functionnal release. 00 atm >- - #3 : the subnumber, moves only on a public release >- - #4 : the developer version. The 4th number is the database subversion. >- used by developers when the database changes. updatedatabase take care of the changes itself >- and is automatically called by Auth.pm when needed. >-=cut >+# the kohaversion is divided in 4 parts : >+# - #1 : the major number. 3 atm >+# - #2 : the functionnal release. 00 atm >+# - #3 : the subnumber, moves only on a public release >+# - #4 : the developer version. The 4th number is the database subversion. >+# used by developers when the database changes. updatedatabase take care of the changes itself >+# and is automatically called by Auth.pm when needed. > > use strict; > > sub kohaversion { >- our $VERSION = '3.07.00.007'; >+ our $VERSION = '3.02.00.059'; > # version needs to be set this way > # so that it can be picked up by Makefile.PL > # during install >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index c80d41c..b6794c6 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -101,8 +101,8 @@ $template->param( > my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); > my $dbh = C4::Context->dbh; > my $dat = TransformMarcToKoha( $dbh, $record ); >-my @subscriptions = GetSubscriptions( undef, undef, $biblionumber ); > >+my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, undef, $biblionumber ); > my @subs; > foreach my $subscription (@subscriptions) { > my %cell; >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 8949444..bc212dc 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -75,6 +75,8 @@ $template->param( biblionumber => $biblionumber ); > > > SetUTF8Flag($record); >+my $marcflavour = C4::Context->preference("marcflavour"); >+my $ean = GetNormalizedEAN( $record, $marcflavour ); > > # XSLT processing of some stuff > if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { >@@ -429,7 +431,7 @@ my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'} > > #coping with subscriptions > my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); >-my @subscriptions = GetSubscriptions( undef, undef, $biblionumber ); >+my @subscriptions = GetSubscriptions($dat->{'title'}, $dat->{'issn'}, $ean, $biblionumber ); > > my @subs; > $dat->{'serial'}=1 if $subscriptionsnumber; >@@ -586,7 +588,6 @@ foreach ( keys %{$dat} ) { > # in each case, we're grabbing the first value we find in > # the record and normalizing it > my $upc = GetNormalizedUPC($record,$marcflavour); >-my $ean = GetNormalizedEAN($record,$marcflavour); > my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); > my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); > my $content_identifier_exists; >diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl >index 02a4fbc..bf4b6e9 100755 >--- a/serials/checkexpiration.pl >+++ b/serials/checkexpiration.pl >@@ -97,5 +97,6 @@ if ($date) { > } > $template->param ( > DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/claims.pl b/serials/claims.pl >index e51148c..1b97a1b 100755 >--- a/serials/claims.pl >+++ b/serials/claims.pl >@@ -100,5 +100,6 @@ $template->param( > branchloop => $branchloop, > dateformat => C4::Context->preference("dateformat"), > DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl >index 64849b5..25092b9 100755 >--- a/serials/routing-preview.pl >+++ b/serials/routing-preview.pl >@@ -137,6 +137,7 @@ $template->param( > memberloop => \@results, > routingnotes => $routingnotes, > hasRouting => check_routing($subscriptionid), >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/routing.pl b/serials/routing.pl >index 2bd7d69..edec688 100755 >--- a/serials/routing.pl >+++ b/serials/routing.pl >@@ -145,6 +145,8 @@ $template->param( > dates => $dates, > routingnotes => $serials[0]->{'routingnotes'}, > hasRouting => check_routing($subscriptionid), >+ (uc(C4::Context->preference("marcflavour"))) => 1 >+ > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/serial-issues.pl b/serials/serial-issues.pl >index 4a971b5..b57baa1 100755 >--- a/serials/serial-issues.pl >+++ b/serials/serial-issues.pl >@@ -108,4 +108,5 @@ if ($selectview eq "full"){ > virtualshelves => "".C4::Context->preference("virtualshelves"), > ); > } >+$template->param((uc(C4::Context->preference("marcflavour"))) => 1); > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index a67db7a..1667e99 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -162,6 +162,7 @@ $template->param( > subscriptioncount => $subscriptioncount, > location => $locationlib, > callnumber => $callnumber, >+ uc(C4::Context->preference("marcflavour")) => 1 > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 9ecd09f..b000a15 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -398,6 +398,8 @@ $template->param( > serialslist => \@serialdatalist, > default_bib_view => $default_bib_view, > location => $locationlib, >+ (uc(C4::Context->preference("marcflavour"))) => 1 >+ > ); > output_html_with_http_headers $query, $cookie, $template->output; > >diff --git a/serials/serials-home.pl b/serials/serials-home.pl >index 8a82df7..1e1492b 100755 >--- a/serials/serials-home.pl >+++ b/serials/serials-home.pl >@@ -48,12 +48,13 @@ use C4::Serials; > use C4::Output; > use C4::Context; > >-my $query = new CGI; >-my $title = $query->param('title_filter'); >-my $ISSN = $query->param('ISSN_filter'); >-my $routing = $query->param('routing')||C4::Context->preference("RoutingSerials"); >-my $searched = $query->param('searched'); >-my $biblionumber = $query->param('biblionumber'); >+my $query = new CGI; >+my $title = $query->param('title_filter'); >+my $ISSN = $query->param('ISSN_filter'); >+my $EAN = $query->param('EAN_filter'); >+my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials"); >+my $searched = $query->param('searched'); >+my $biblionumber = $query->param('biblionumber'); > > my @serialseqs = $query->param('serialseq'); > my @planneddates = $query->param('planneddate'); >@@ -91,8 +92,8 @@ if (@serialseqs){ > $template->param('information'=>\@information); > } > my @subscriptions; >-if ($searched){ >- @subscriptions = GetSubscriptions( $title, $ISSN, $biblionumber ); >+if ($searched) { >+ @subscriptions = GetSubscriptions( $title, $ISSN, $EAN, $biblionumber ); > } > > # to toggle between create or edit routing list options >@@ -108,5 +109,7 @@ $template->param( > ISSN_filter => $ISSN, > done_searched => $searched, > routing => $routing, >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); >+ > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/serials-recieve.pl b/serials/serials-recieve.pl >index cc67949..770d10d 100755 >--- a/serials/serials-recieve.pl >+++ b/serials/serials-recieve.pl >@@ -278,5 +278,6 @@ $template->param( > frommissing => $manualstatus, > missingdate => $manualdate, > missingid => $manualid, >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 9acee7b..e78e64b 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -170,6 +170,7 @@ if ($op eq 'addsubscription') { > $template->param(bibliotitle => $bib->{title}); > } > } >+ $template->param((uc(C4::Context->preference("marcflavour"))) => 1); > output_html_with_http_headers $query, $cookie, $template->output; > } > >@@ -350,3 +351,4 @@ sub redirect_mod_subscription { > print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); > return; > } >+ >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 7386820..38bdc0d 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -137,6 +137,7 @@ $template->param( > intranetcolorstylesheet => C4::Context->preference('intranetcolorstylesheet'), > irregular_issues => scalar @irregular_issues, > default_bib_view => $default_bib_view, >+ (uc(C4::Context->preference("marcflavour"))) => 1 > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/serials/viewalerts.pl b/serials/viewalerts.pl >index d2d1368..5944ce1 100755 >--- a/serials/viewalerts.pl >+++ b/serials/viewalerts.pl >@@ -52,6 +52,8 @@ foreach (@$borrowers) { > } > $template->param(alertloop => $borrowers, > bibliotitle => $subscription->{bibliotitle}, >- subscriptionid => $subscriptionid); >+ subscriptionid => $subscriptionid, >+ (uc(C4::Context->preference("marcflavour"))) => 1 >+ ); > > output_html_with_http_headers $input, $cookie, $template->output; >-- >1.7.5.4 >
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 5337
:
7172
|
7694
|
8349
|
8380
|
8692
|
9759
|
10009
|
10016
|
10243