[Bug 5415] New: Simplify Returns from SimpleSearch
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5415 Summary: Simplify Returns from SimpleSearch Change sponsored?: --- Product: Koha Version: HEAD Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Searching AssignedTo: gmcharlt@gmail.com ReportedBy: colin.campbell@ptfs-europe.com QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 SimpleSearch routine returns an array of three values an errorstring, a reference to an array of records and a scalar number of hits. If an error is returned the array_ref and hit_count are undefined If there is no error returned the errorstring is undefined. but the other elements maybe defined or undefined. As a result it exports complexity into the calling interface which typically has to test is there an error then for each return element test definedness then assign it etc. leading to code hard to read, maintain and sometimes get right. People do seem to have a problems resulting from the implied "randomness" of the return. Proposal that the variables used in non-error returns are initialized so that they are only undefined in in error returns. Current code should still work as is (otherwise its a bit buggy already!) Will mean that only error needs checking if not defined hit_count is a scalar >= 0 and array_ref is a ref to a (possibly empty) array. Calls to SimpleSearch can then simplified accordingly -- 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=5415 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|gmcharlt@gmail.com |colin.campbell@ptfs-europe. | |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=5415 --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-11-17 14:26:04 UTC --- Created attachment 2767 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=2767 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=5415 --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-11-17 14:27:13 UTC --- Created attachment 2768 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=2768 Proposed Patch 2 -- 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=5415 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent -- 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=5415 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz 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=5415 --- Comment #3 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2010-12-13 12:16:34 UTC --- This bug is mentioned in: Bug 5415 More consistent returns from SimpleSearch http://lists.koha-community.org/pipermail/koha-patches/2010-November/013053.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013054.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013061.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013062.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013063.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013071.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013072.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013074.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013073.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013075.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013064.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013067.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013068.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013069.... Bug 5415 Let calls of SimpleSearch utilize considtent interface http://lists.koha-community.org/pipermail/koha-patches/2010-November/013070.... -- 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=5415 Christophe Croullebois <christophe.croullebois@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christophe.croullebois@bibl | |ibre.com AssignedTo|colin.campbell@ptfs-europe. |christophe.croullebois@bibl |com |ibre.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=5415 Christophe Croullebois <christophe.croullebois@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #2768|0 |1 is obsolete| | --- Comment #4 from Christophe Croullebois <christophe.croullebois@biblibre.com> 2011-04-04 15:58:20 UTC --- Created attachment 3646 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3646 Proposed Patch 3 This patch replace the Proposed Patch 2. -- 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=5415 Christophe Croullebois <christophe.croullebois@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=5415 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-08 01:55:15 UTC --- pushed please test -- 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org