Bug 5864: link biblio => serials subscription is wrong
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 18 Mar 2011 10:15:08 +0000 (10:15 +0000)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 20 Mar 2011 22:54:21 +0000 (11:54 +1300)
The GetSubscription function can be called with 3 parameters : title,
issn, biblionumber.
In biblio view (both opac & staff interface), the link to jump from the
biblio to the subscription(s) was done using title.

The result was that for a title like "Science", all subscriptions
containing "science" in the title were linked.
That's too much and that's false.

This commit fixes this problem by calling GetSubscription with
biblionumber only where applicable.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc
opac/opac-ISBDdetail.pl
opac/opac-detail.pl

index 97b642f..123e71c 100644 (file)
@@ -24,7 +24,7 @@
     <!-- TMPL_IF NAME="holdsview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_IF NAME="object" --><!-- TMPL_VAR NAME="object" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="biblionumber" --><!-- /TMPL_IF -->">Holds</a></li>
     <!-- /TMPL_IF -->
 
-    <!-- TMPL_IF name="subscriptionsnumber" --><li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&amp;title_filter=<!-- TMPL_VAR NAME="subscriptiontitle" -->">Subscription(s)</a></li><!-- /TMPL_IF -->
+    <!-- TMPL_IF name="subscriptionsnumber" --><li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Subscription(s)</a></li><!-- /TMPL_IF -->
 </ul>
 <ul>
 <!-- TMPL_IF NAME="issuehistoryview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF -->
index 6e4d276..b50947d 100755 (executable)
@@ -98,8 +98,8 @@ $template->param(
 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
 my $dbh = C4::Context->dbh;
 my $dat                 = TransformMarcToKoha( $dbh, $record );
-my @subscriptions       =
-  GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
+my @subscriptions       = GetSubscriptions( undef, undef, $biblionumber );
+
 my @subs;
 foreach my $subscription (@subscriptions) {
     my %cell;
index 6dc983f..1015e54 100755 (executable)
@@ -102,7 +102,7 @@ my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}
 
 #coping with subscriptions
 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
-my @subscriptions       = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
+my @subscriptions       = GetSubscriptions( undef, undef, $biblionumber );
 
 my @subs;
 $dat->{'serial'}=1 if $subscriptionsnumber;