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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 20 21:54:18 CEST 2011


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

Frédérick Capovilla <fcapovilla at live.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fcapovilla at live.ca

--- Comment #7 from Frédérick Capovilla <fcapovilla at live.ca> 2011-05-20 19:54:18 UTC ---
Comment on this problem :
The patch that was pushed fixes this particular problem by passing less filters
to the GetSubscriptions() subroutine, but it doesn't fix the main problem :
GetSubscriptions() is still searching too generally.

I tried printing the final query created by GetSubscriptions and here is what
it looks like :

SELECT subscription.*, subscriptionhistory.*,
biblio.title,biblioitems.issn,biblio.biblionumber
            FROM   subscription
            LEFT JOIN subscriptionhistory USING(subscriptionid)
            LEFT JOIN biblio ON biblio.biblionumber = subscription.biblionumber
            LEFT JOIN biblioitems ON biblio.biblionumber =
biblioitems.biblionumber
       WHERE biblio.biblionumber=? AND (biblio.title LIKE ? ) OR
(subscription.callnumber LIKE ? ) OR (subscription.location LIKE ? ) OR
(subscription.notes LIKE ? ) OR (subscription.internalnotes LIKE ? ) AND
(biblioitems.issn LIKE ? ) OR (subscription.callnumber LIKE ? ) ORDER BY title

Example binds used : "47569" "%M%" "%M%" "%M%" "%M%" "%M%" "%1715-4820%"
"%1715-4820%"

I think the query generated by GetSubscriptions needs to be fixed too...

-- 
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