[Bug 23404] New: Circulation::TooMany error on itemtype when at biblio level
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Bug ID: 23404 Summary: Circulation::TooMany error on itemtype when at biblio level Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed. When itemtype is at biblio level, calling $item->{'itemtype'} is wrong. -- 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=23404 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Status|NEW |ASSIGNED -- 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=23404 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 91891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91891&action=edit Bug 23404: add UT to show bug Run prove t/db_dependent/Circulation/TooMany.t It fails on : # Failed test 'We are only allowed one, and we have one (itemtype on biblioitem)' # at t/db_dependent/Circulation/TooMany.t line 547. # Structures begin differing at: # $got->{reason} = 'NO_RULE_DEFINED' # $expected->{reason} = 'TOO_MANY_CHECKOUTS' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 91892 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91892&action=edit Bug 23404: fix Circulation::TooMany error on itemtype when at biblio level Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed. When itemtype is at biblio level, calling $item->{'itemtype'} is wrong. Test plan : 1) On a catalog with itemtype at item level : pref item-level_itypes=1 2) Create a biblio record with itemtype BOOK 3) Create an item on this biblio record with itemtype BOOK 4) Delete all issuing rules 5) Create a issuing rule with itemtype BOOK, any catagorie, any branch 6) Check-out the item 7) => Checkout is allowed 8) Check-in item 9) Change itemtype at biblio level : pref item-level_itypes=0 10) Check-out the item 11) => Checkout is not allowed You see message "No circulation rule is defined for this patron and itemtype combination" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 91893 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91893&action=edit Bug 23404: Change UT calls Run prove t/db_dependent/Circulation/TooMany.t Tests are OK -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #4 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Fridolin SOMERS from comment #2)
Created attachment 91892 [details] [review] Bug 23404: fix Circulation::TooMany error on itemtype when at biblio level
Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed. When itemtype is at biblio level, calling $item->{'itemtype'} is wrong.
Note that patch removes in TooMany() method second arg $biblionumber, it is useless. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #5 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- 18.11.x needs to add to C4::Circulation::CanBookBeIssued : my $item_object = Koha::Items->find({barcode => $barcode }); after my $item = GetItem(undef, $barcode ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Kyle M Hall <kyle@bywatersolutions.com> 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=23404 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91891|0 |1 is obsolete| | Attachment #91892|0 |1 is obsolete| | Attachment #91893|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 92626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92626&action=edit Bug 23404: add UT to show bug Run prove t/db_dependent/Circulation/TooMany.t It fails on : # Failed test 'We are only allowed one, and we have one (itemtype on biblioitem)' # at t/db_dependent/Circulation/TooMany.t line 547. # Structures begin differing at: # $got->{reason} = 'NO_RULE_DEFINED' # $expected->{reason} = 'TOO_MANY_CHECKOUTS' Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 92627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92627&action=edit Bug 23404: fix Circulation::TooMany error on itemtype when at biblio level Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed. When itemtype is at biblio level, calling $item->{'itemtype'} is wrong. Test plan : 1) On a catalog with itemtype at item level : pref item-level_itypes=1 2) Create a biblio record with itemtype BOOK 3) Create an item on this biblio record with itemtype BOOK 4) Delete all issuing rules 5) Create a issuing rule with itemtype BOOK, any catagorie, any branch 6) Check-out the item 7) => Checkout is allowed 8) Check-in item 9) Change itemtype at biblio level : pref item-level_itypes=0 10) Check-out the item 11) => Checkout is not allowed You see message "No circulation rule is defined for this patron and itemtype combination" Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 92628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92628&action=edit Bug 23404: Change UT calls Run prove t/db_dependent/Circulation/TooMany.t Tests are OK Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92626|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92627|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92628|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92655&action=edit Bug 23404: add UT to show bug Run prove t/db_dependent/Circulation/TooMany.t It fails on : # Failed test 'We are only allowed one, and we have one (itemtype on biblioitem)' # at t/db_dependent/Circulation/TooMany.t line 547. # Structures begin differing at: # $got->{reason} = 'NO_RULE_DEFINED' # $expected->{reason} = 'TOO_MANY_CHECKOUTS' Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92656 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92656&action=edit Bug 23404: fix Circulation::TooMany error on itemtype when at biblio level Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed. When itemtype is at biblio level, calling $item->{'itemtype'} is wrong. Test plan : 1) On a catalog with itemtype at item level : pref item-level_itypes=1 2) Create a biblio record with itemtype BOOK 3) Create an item on this biblio record with itemtype BOOK 4) Delete all issuing rules 5) Create a issuing rule with itemtype BOOK, any catagorie, any branch 6) Check-out the item 7) => Checkout is allowed 8) Check-in item 9) Change itemtype at biblio level : pref item-level_itypes=0 10) Check-out the item 11) => Checkout is not allowed You see message "No circulation rule is defined for this patron and itemtype combination" Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92657&action=edit Bug 23404: Change UT calls Run prove t/db_dependent/Circulation/TooMany.t Tests are OK Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92658 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92658&action=edit Bug 23404: (QA follow-up) Minor fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.04 released in| | Status|Pushed to master |Pushed to stable --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23404 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16787 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org