[Koha-bugs] [Bug 6271] New: GetItemIssue(s) : renewals in both items and issues tables

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 27 15:31:53 CEST 2011


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

             Bug #: 6271
           Summary: GetItemIssue(s) : renewals in both items and issues
                    tables
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: rel_3_4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Database
        AssignedTo: gmcharlt at gmail.com
        ReportedBy: fridolyn.somers at gmail.com
         QAContact: koha-bugs at lists.koha-community.org


In Circulation.pm : 
GetItemIssue returns informations about issues and items using a LEFT JOIN : 
    SELECT * FROM issues LEFT JOIN items ON issues.itemnumber=items.itemnumber

The bug is that the fields "renewals" exists in both issues and items table.
With SELECT *, only one of the two fields will be retrieved (mostly
issues.renewals).

There are other queries using JOIN between issues and items.

Two solutions : 
 - Not use SELECT * and define an alias for items.renewals, in each queries.
 - rename items.renewals in items.itemrenewals, in database model.

Regards,

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