[Bug 21641] New: Software error when checking out an item with a charge associated with it
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Bug ID: 21641 Summary: Software error when checking out an item with a charge associated with it 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: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When you try to check out an item with a charge associated with it the following error is thrown as the C4::Circulation->AddIssuingCharge() is executed: Undefined subroutine &C4::Circulation::getnextacctno called at /home/vagrant/kohaclone/C4/Circulation.pm line 3194 The getnextacctno function is in C4::Accounts. This module is in a use pragma at the top of C4/Circulation.pm -- 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=21641 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 81046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81046&action=edit Bug 21641: Added C4::Accounts to getnextacctno() call Test plan: 1. Fetch and checkout the master branch 2. Checkout an item with a rental charge associated with it to a user and notice an error is thrown 3. Apply patch 4. Restart memcached and plack 5. Repeat steps 1 and 2 and notice the checkout happens successfully Sponsored-By: Catalyst IT -- 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=21641 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |alexbuckley@catalyst.net.nz |ity.org | -- 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=21641 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81046|0 |1 is obsolete| | --- Comment #2 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 81138 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81138&action=edit Bug 21641: Added C4::Accounts to getnextacctno() call Test plan: 1. Fetch and checkout the master branch 2. Checkout an item with a rental charge associated with it to a user and notice an error is thrown 3. Apply patch 4. Restart memcached and plack 5. Repeat steps 1 and 2 and notice the checkout happens successfully Sponsored-By: Catalyst IT Signed-off-by: Andrew Isherwood <andrew.isherwood@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=21641 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81138|0 |1 is obsolete| | --- Comment #3 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 81139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81139&action=edit Bug 21641: Added C4::Accounts to getnextacctno() call Test plan: 1. Fetch and checkout the master branch 2. Checkout an item with a rental charge associated with it to a user and notice an error is thrown 3. Apply patch 4. Restart memcached and plack 5. Repeat steps 1 and 2 and notice the checkout happens successfully Sponsored-By: Catalyst IT Signed-off-by: Andrew Isherwood <andrew.isherwood@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=21641 --- Comment #4 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 81140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81140&action=edit Bug 21641: (follow-up) Address additional call This patch makes the same change as the main patch, just for an additional occurance of getnextacctno -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew.isherwood@ptfs-europ | |e.com --- Comment #5 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Hi Alex I applied the patch and received the error: Undefined subroutine &C4::Circulation::getnextacctno called at /usr/share/koha/C4/Circulation.pm line 2854. I've added a patch to address this. I've signed off your patch, if you sign off mine we should be good to go. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |mtompset@hotmail.com --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- NOTE: This is why I asked about the the order of 'use' on the developers mailing list. I'm pretty sure this could be solved with an order change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Also, I've been pondering... shouldn't this getnextacctno be in Koha::Account::Line(s)? It is just using the AccountLines table no relationships. I think it is a perfect candidate for moving. AND... when is getnextacctno called? Almost always in the midst of generating a new account line. Why not remove the necessity for accountno being passed in a ->new() and determine the account line number id at save time? This means some code clean up, but I think it is better in the long run than this short term patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Failed QA --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Jonathan Druart thinks this is sufficient for now. Failing, because wrong call method. C4::Accounts::getnextacctno and C4::Accounts->getnextacctno are different. The latter passes ($self, $param), the former is only ($param). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=14825 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 --- Comment #9 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 81149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81149&action=edit Bug 21641: (follow-up) Address wrong call method This patch substitutes C4::Accounts->getnextacctno for C4::Accounts::getnextacctno since getnextacctno is only expecting to be passed a borrowernumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Andrew Isherwood <andrew.isherwood@ptfs-europe.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=21641 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. Tompsett from comment #7)
Also, I've been pondering... shouldn't this getnextacctno be in Koha::Account::Line(s)? It is just using the AccountLines table no relationships. I think it is a perfect candidate for moving.
AND... when is getnextacctno called? Almost always in the midst of generating a new account line. Why not remove the necessity for accountno being passed in a ->new() and determine the account line number id at save time? This means some code clean up, but I think it is better in the long run than this short term patch.
The accountno field and the associated functions should be removed. I don't think we should move that anywhere. :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81140|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=21641 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81149|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=21641 --- Comment #11 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 81200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81200&action=edit Bug 21641: (follow-up) Address additional call This patch makes the same change as the main patch, just for an additional occurance of getnextacctno Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 --- Comment #12 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 81201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81201&action=edit Bug 21641: (follow-up) Address wrong call method This patch substitutes C4::Accounts->getnextacctno for C4::Accounts::getnextacctno since getnextacctno is only expecting to be passed a borrowernumber Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 --- Comment #13 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi Andrew Thanks for signing off on my patch and writing the followups addressing the incorrect call method. I have tested and everything is working correctly so have signed off. Cheers, Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 --- Comment #14 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Tomás Cohen Arazi from comment #10)
The accountno field and the associated functions should be removed. I don't think we should move that anywhere. :-D
Hmmm... we already have accountlines_id. You're probably right, cut and refactor anything that used it. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21683 --- Comment #15 from Josef Moravec <josef.moravec@gmail.com> --- See bug 21683 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81139|0 |1 is obsolete| | --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 81408 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81408&action=edit Bug 21641: Added C4::Accounts to getnextacctno() call Test plan: 1. Fetch and checkout the master branch 2. Checkout an item with a rental charge associated with it to a user and notice an error is thrown 3. Apply patch 4. Restart memcached and plack 5. Repeat steps 1 and 2 and notice the checkout happens successfully Sponsored-By: Catalyst IT Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.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=21641 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81200|0 |1 is obsolete| | --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 81409 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81409&action=edit Bug 21641: (follow-up) Address additional call This patch makes the same change as the main patch, just for an additional occurance of getnextacctno Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> 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=21641 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81201|0 |1 is obsolete| | --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 81410 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81410&action=edit Bug 21641: (follow-up) Address wrong call method This patch substitutes C4::Accounts->getnextacctno for C4::Accounts::getnextacctno since getnextacctno is only expecting to be passed a borrowernumber Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> 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=21641 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #21 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 21679 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21641 Andrew Isherwood <bugzilla@warmlight.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|bugzilla@warmlight.co.uk | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org