Bug 24259 - Circulation fails if no circ rule defined but checkout override confirmed
Summary: Circulation fails if no circ rule defined but checkout override confirmed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 20912
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-18 04:24 UTC by Nick Clemens
Modified: 2021-06-14 21:29 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02


Attachments
Bug 24259: Handle non existing default circ rule in Charges::Fees (1.07 KB, patch)
2019-12-18 09:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24259: Handle non existing default circ rule in Charges::Fees (1.07 KB, patch)
2019-12-18 09:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24259: Handle non existing default circ rule in Charges::Fees (1.10 KB, patch)
2019-12-19 15:29 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 24259: Handle non existing default circ rule in Charges::Fees (1.16 KB, patch)
2019-12-20 13:50 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-12-18 04:24:22 UTC
Can't call method "lengthunit" on an undefined value at /usr/share/koha/lib/Koha/Charges/Fees.pm line 101.

TO recreate:
1 - Remove all/all rule form circulation rules
2 - Define a rental fee per day for an itemtype
3 - Checkout an item of this type ot patron
4 - Should get note of no circ rule defined
5 - Confirm the checkout, internal server error
Comment 1 Nick Clemens 2019-12-18 04:32:58 UTC
Note, you don't have to have a rental charge defined - the checkout triggers the error as we always check the rental charge to see if there is one or not
Comment 2 Jonathan Druart 2019-12-18 09:51:59 UTC
Created attachment 96407 [details] [review]
Bug 24259: Handle non existing default circ rule in Charges::Fees

Can't call method "lengthunit" on an undefined value at
/usr/share/koha/lib/Koha/Charges/Fees.pm line 101.

Test plan:
1 - Remove all/all rule form circulation rules
2 - Define a rental fee per day for an itemtype
3 - Checkout an item of this type ot patron
4 - Should get note of no circ rule defined
5 - Confirm the checkout
=> item is checked out
Comment 3 Jonathan Druart 2019-12-18 09:53:03 UTC
Created attachment 96408 [details] [review]
Bug 24259: Handle non existing default circ rule in Charges::Fees

Can't call method "lengthunit" on an undefined value at
/usr/share/koha/lib/Koha/Charges/Fees.pm line 101.

Test plan:
1 - Remove all/all rule form circulation rules
2 - Define a rental fee per day for an itemtype
3 - Checkout an item of this type ot patron
4 - Should get note of no circ rule defined
5 - Confirm the checkout
=> item is checked out
Comment 4 ByWater Sandboxes 2019-12-19 15:29:18 UTC
Created attachment 96488 [details] [review]
Bug 24259: Handle non existing default circ rule in Charges::Fees

Can't call method "lengthunit" on an undefined value at
/usr/share/koha/lib/Koha/Charges/Fees.pm line 101.

Test plan:
1 - Remove all/all rule form circulation rules
2 - Define a rental fee per day for an itemtype
3 - Checkout an item of this type ot patron
4 - Should get note of no circ rule defined
5 - Confirm the checkout
=> item is checked out

Signed-off-by: hc <hc@interleaf.ie>
Comment 5 Nick Clemens 2019-12-20 13:50:26 UTC
Created attachment 96525 [details] [review]
Bug 24259: Handle non existing default circ rule in Charges::Fees

Can't call method "lengthunit" on an undefined value at
/usr/share/koha/lib/Koha/Charges/Fees.pm line 101.

Test plan:
1 - Remove all/all rule form circulation rules
2 - Define a rental fee per day for an itemtype
3 - Checkout an item of this type ot patron
4 - Should get note of no circ rule defined
5 - Confirm the checkout
=> item is checked out

Signed-off-by: hc <hc@interleaf.ie>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Martin Renvoize 2019-12-23 10:52:19 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-01-03 22:24:48 UTC
Pushed to 19.11.x for 19.11.02
Comment 8 Lucas Gass 2020-01-09 21:43:06 UTC
backported to 19.05.x for 19.05.07