[Koha-bugs] [Bug 5864] New: Is C4::Serials::GetSubscriptions searching too generally?

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 14 14:58:42 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5864

             Bug #: 5864
           Summary: Is C4::Serials::GetSubscriptions searching too
                    generally?
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: OPAC
        AssignedTo: oleonard at myacpl.org
        ReportedBy: magnus at enger.priv.no
         QAContact: koha-bugs at lists.koha-community.org


After migrating subscription data from 2.2.9 to 3.2.1, 6 of about 222
subscriptions were showing two or three lists of "latest issues", lets say
"Journal A" was displaying the list of "latest issues" for "Journal A", but
also for "Journal X" and "Journal Y". 

The first theory was that an incorrect biblionumber had been put in e.g. the
subscriptions table (they had to be updated since the biblionumbers changed
from the old to the new database), but scrutiny of the data showed this not to
be the case. "Jounal X" and "Journal Y" were displaying just fine on their own
(looking up the biblionumber showed the expected results). 

The problem was solved by changing line 104 of opac/opac-detail.pl from this: 

my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn},
$biblionumber );

to this: 

my @subscriptions = GetSubscriptions( '', $dat->{issn}, $biblionumber );

preventing C4::Serials::GetSubscriptions from using the title of the journal
for finding subscription information. 

Looking at the code in C4::Serials::GetSubscriptions it looks like, if a title
is provided, the function will look for it in all of these fields: 

biblio.title 
subscription.callnumber 
subscription.location 
subscription.notes 
subscription.internalnotes

returning any subscriptions where the title is found, including any where the
string occurs in notes subscription.notes and subscription.internalnotes! 

This was indeed the case for our original problem, the journal that was
displaying extra lists of issues was "Science" ("Journal A"), and the two extra
journals having their issues erroneously displayed ("Journal X" and "Journal
Y") had the word "science" mentioned in the subscription.notes field. 

Changing the call to GetSubscriptions worked in this case, but I'm not sure it
would be an improvement for everyone? 

This was tested with 3.2.1, but the code seems to be same in master.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list