[Bug 6271] New: GetItemIssue(s) : renewals in both items and issues tables
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@gmail.com ReportedBy: fridolyn.somers@gmail.com QAContact: koha-bugs@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |colin.campbell@ptfs-europe. | |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> 2011-04-27 13:50:20 UTC --- SELECT * is generally frowned on in db circles and issues.renewals and items.renewals describe the contents of these fields accurately. If one changes name theres not really a good way of recalling which one has been aliased (or why if dealing only with that table) -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@gmail.com> 2011-04-27 13:59:00 UTC --- (In reply to comment #1)
SELECT * is generally frowned on in db circles and issues.renewals and items.renewals describe the contents of these fields accurately. If one changes name theres not really a good way of recalling which one has been aliased (or why if dealing only with that table)
I agree, the LEFT JOIN is only to get some fields from items. We should change SELECT * in : -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 --- Comment #3 from Fridolyn SOMERS <fridolyn.somers@gmail.com> 2011-04-27 14:01:03 UTC --- SELECT issues.*, items.homebranch, items.holdingbranch, items.notforlaon, ... (end of previous comment) -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 --- Comment #4 from Fridolyn SOMERS <fridolyn.somers@gmail.com> 2011-08-30 15:59:12 UTC --- Created attachment 5225 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5225 Proposed patch -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 Fridolyn SOMERS <fridolyn.somers@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 --- Comment #5 from Fridolyn SOMERS <fridolyn.somers@gmail.com> 2011-08-30 16:03:57 UTC --- Patch solves the problem by always adding "items.renewals AS totalrenewals" in queries where issues and items are joined. This behavior comes from Member.pm : GetPendingIssues and GetAllIssues Please test. Reads, -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |nengard@gmail.com AssignedTo|gmcharlt@gmail.com |fridolyn.somers@gmail.com -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 dev_patches@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dev_patches@biblibre.com --- Comment #6 from dev_patches@biblibre.com 2011-09-02 09:43:48 UTC --- GBSD#4 taking that. -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 dev_patches@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-06 15:14:13 UTC --- QA comment : * OK, problem is real, but where can I check the differences ? (please, a test plan !) * There's another problem (that existed before this patch SELECT * FROM issues LEFT JOIN biblioitems LEFT JOIN items will return all xml, that is useless & require memory & CPU. I suggest opening another bug for this (Fridolyn, would you please ?) * why didn't you use the solution you've suggested in comment 3 ? Marking failed QA until you've answered those concerns -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Failed QA -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6271 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Is the issue still exist? Can we have an example? -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org