Summary: | GetAuthorisedValueByCode does not handle undef intelligently | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | Architecture, internals, and plumbing | Assignee: | Colin Campbell <colin.campbell> |
Status: | CLOSED WONTFIX | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | bgkriegel, colin.campbell, jonathan.druart, mtompset, tomascohen, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10363 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Proposed patch
Bug 14627 Check for undef passed to GetAuthorisedValueByCode Bug 14627: Improve SQL query [SIGNED-OFF] Bug 14627: Check for undef passed to GetAuthorisedValueByCode [SIGNED-OFF] Bug 14627: Improve SQL query |
Description
Colin Campbell
2015-07-31 13:48:01 UTC
Trivial patch - improves code flow saving unnecessary processing Created attachment 41266 [details] [review] Proposed patch Colin, your patch makes sense. But what do u think of focusing on bug 10363? It has lagged a bit. Maybe another couple of eyes can make it move faster. Created attachment 43090 [details] [review] Bug 14627 Check for undef passed to GetAuthorisedValueByCode Dont prepare or execute unnecessary sql if passed an undef value routine is used in various places that dont check if the value returned from a nullable field is defined or not (e.g. streettype in the borrower record which many sites do not use) Lets save those cpu cycles for something useful Created attachment 43091 [details] [review] Bug 14627: Improve SQL query A field=NULL condition does not run properly. If category is undefined, then don't include it in the query. Just wanted to put my work here, before I blew it away. :) I figure bug 10363 as mentioned by Tomas will probably make this obsoleted and not required. Created attachment 44263 [details] [review] [SIGNED-OFF] Bug 14627: Check for undef passed to GetAuthorisedValueByCode Dont prepare or execute unnecessary sql if passed an undef value routine is used in various places that dont check if the value returned from a nullable field is defined or not (e.g. streettype in the borrower record which many sites do not use) Lets save those cpu cycles for something useful Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Created attachment 44264 [details] [review] [SIGNED-OFF] Bug 14627: Improve SQL query A field=NULL condition does not run properly. If category is undefined, then don't include it in the query. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No regressions detected, no errors Can we please get unit tests and a test plan for this? This subroutine is going to be removed by bug 17252 |