[Bug 24331] New: Internal server error when placing hold on item if itemtype undefined
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Bug ID: 24331 Summary: Internal server error when placing hold on item if itemtype undefined Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Error is: Can't call method "notforloan" on an undefined value at /usr/share/koha/lib/C4/Reserves.pm line 1199. C4::Reserves::IsAvailableForItemLevelRequest: 1198 my $itemtype = $item->effective_itemtype; 1199 my $notforloan_per_itemtype = Koha::ItemTypes->find($itemtype)->notforloan; We should check that we found an itemtype before calling notforloan -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96793&action=edit Bug 24331: Don't die on items with no type To test: 1 - Find or create an item with no itemtype set 2 - Attempt to place a hold 3 - INternal server error 4 - Apply patch 5 - Repeat 6 - No error 7 - Set the items itemtype to an itemtype marked not for loan 8 - Set circ rules to allow holds on this itemtype 9 - Attempt to place hold, item is not holdable 10 - Remove not for loan from itemtype 11 - Item is holdable -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96793|0 |1 is obsolete| | --- Comment #2 from Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> --- Created attachment 97584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97584&action=edit Bug 24331: Don't die on items with no type To test: 1 - Find or create an item with no itemtype set 2 - Attempt to place a hold 3 - INternal server error 4 - Apply patch 5 - Repeat 6 - No error 7 - Set the items itemtype to an itemtype marked not for loan 8 - Set circ rules to allow holds on this itemtype 9 - Attempt to place hold, item is not holdable 10 - Remove not for loan from itemtype 11 - Item is holdable Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mkstephens@lancasterseminar | |y.edu --- Comment #3 from Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> --- Patch works as described in test plan. Thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, did not we (more or less) agree that we should not test if items had valid item type? See bug 21842. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21842 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #4)
Nick, did not we (more or less) agree that we should not test if items had valid item type? See bug 21842.
Although I still intuitively feel that such tests are appropriate, I also had the impression that we agreed not to add such tests everywhere. If this still needs discussion, please change status accordingly. It would be wise to have a specific coding guideline for this, Jonathan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've added an item about this to the next dev meeting agenda: https://wiki.koha-community.org/wiki/Development_IRC_meeting_20_May_2020#Age... Please feel free to add any arguments to it! Goal would be to move towards a general guideline here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25449 CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24331 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |DUPLICATE --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- https://meetings.koha-community.org/2020/development_irc_meeting_20_may_2020... Search for "bug 24331". We agreed on making it mandatory, see bug 25449. *** This bug has been marked as a duplicate of bug 25449 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org