[Bug 15473] New: Koha::Objects->find should find if the key is an empty string
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Bug ID: 15473 Summary: Koha::Objects->find should find if the key is an empty string Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 15381 This bug has been found after bug 15381 was pushed: If you go on authorities/authorities.pl, you expect a form to create a authorities with a "Default" authority type. Now, it explodes: Can't call method "authtypetext" on an undefined value at /home/koha/src/authorities/authorities.pl line 665. Koha::Objects->find does not want to search if the key does not exist (undef, '', 0). But actually it should only be a coward if it is not defined. Moreover this is the default behavior of the DBIx::Class find method. Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15381 [Bug 15381] Move the authority types related code to Koha::Authority::Type[s] - part 2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 46266 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46266&action=edit Bug 15473: Make Koha::Objects->find accepts 0 and '' as a key This bug has been found after bug 15381 was pushed: If you go on authorities/authorities.pl, you expect a form to create a authorities with a "Default" authority type. Now, it explodes: Can't call method "authtypetext" on an undefined value at /home/koha/src/authorities/authorities.pl line 665. Koha::Objects->find does not want to search if the key does not exist (undef, '', 0). But actually it should only be a coward if it is not defined. Moreover this is the default behavior of the DBIx::Class find method. Test plan: prove t/db_dependent/Koha/Objects.t should return green and GET /cgi-bin/koha/authorities/authorities.pl should not make everything explode. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 15470 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46266|0 |1 is obsolete| | --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 46269 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46269&action=edit [SIGNED-OFF] Bug 15473: Make Koha::Objects->find accepts 0 and '' as a key This bug has been found after bug 15381 was pushed: If you go on authorities/authorities.pl, you expect a form to create a authorities with a "Default" authority type. Now, it explodes: Can't call method "authtypetext" on an undefined value at /home/koha/src/authorities/authorities.pl line 665. Koha::Objects->find does not want to search if the key does not exist (undef, '', 0). But actually it should only be a coward if it is not defined. Moreover this is the default behavior of the DBIx::Class find method. Test plan: prove t/db_dependent/Koha/Objects.t should return green and GET /cgi-bin/koha/authorities/authorities.pl should not make everything explode. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Find this after signing 15470 :) Test pass, new auth (Default) created, no errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46269|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 46423 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46423&action=edit Bug 15473: Make Koha::Objects->find accepts 0 and '' as a key This bug has been found after bug 15381 was pushed: If you go on authorities/authorities.pl, you expect a form to create a authorities with a "Default" authority type. Now, it explodes: Can't call method "authtypetext" on an undefined value at /home/koha/src/authorities/authorities.pl line 665. Koha::Objects->find does not want to search if the key does not exist (undef, '', 0). But actually it should only be a coward if it is not defined. Moreover this is the default behavior of the DBIx::Class find method. Test plan: prove t/db_dependent/Koha/Objects.t should return green and GET /cgi-bin/koha/authorities/authorities.pl should not make everything explode. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Find this after signing 15470 :) Test pass, new auth (Default) created, no errors. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #5 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - thanks -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15473 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.2 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org