Bug 21679

Summary: Software error when placing a hold on an item with a charge associated with it
Product: Koha Reporter: Andrew Isherwood <bugzilla>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: cbrannon, gmcharlt, josef.moravec, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21683
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 21679: Fix incorrect call to getnextacctno

Description Andrew Isherwood 2018-10-26 08:19:08 UTC
When you try and place a hold on an item with a charge associated with it, the hold fails with the error:

Undefined subroutine &C4::Reserves::getnextacctno called at /usr/share/koha/C4/Reserves.pm line 574.

The getnextacctno function is in C4::Accounts. This is exactly the same issue as bug 21641 and should be resolved in the same way.
Comment 1 Andrew Isherwood 2018-10-26 08:28:33 UTC
Created attachment 81256 [details] [review]
Bug 21679: Fix incorrect call to getnextacctno

The call to getnextacctno was attempting to be made to C4::Reserves
rather than to C4::Accounts. This patch addresses this by explicitly
stating the full path to the function.
Comment 2 Josef Moravec 2018-10-26 11:27:36 UTC
See bug 21683
Comment 3 Andrew Isherwood 2018-10-30 09:29:06 UTC
Test plan:

- Before applying the patch
- Attempt to place a hold on an item with a charge associated with it
=> Observe that this fails with the error "Undefined subroutine &C4::Reserves::getnextacctno called at /usr/share/koha/C4/Reserves.pm line 574."
- Apply the patch
- Attempt to place a hold on an item with a charge associated with it
=> Observe that the hold now succeeds
Comment 4 Christopher Brannon 2018-11-08 19:02:57 UTC
Please check testing conditions.  There may be more to recreating the problem than discribed.  Or it may have been resolved elsewhere.
Comment 5 Christopher Brannon 2018-11-08 19:03:45 UTC
I should have stated that I cannot get the error under the conditions described.
Comment 6 Katrin Fischer 2018-11-08 19:07:34 UTC
It sounds like bug 21614 maybe?
Comment 7 Katrin Fischer 2019-02-04 22:56:48 UTC
(In reply to Katrin Fischer from comment #6)
> It sounds like bug 21614 maybe?

Should have been:

Bug 21641 - Software error when checking out an item with a charge associated with it 

Marking as duplicate now.

*** This bug has been marked as a duplicate of bug 21641 ***