Bug 23323 - Koha::RefundLostItemFeeRules->find() should require `branchcode`, `categorycode` and `itemtype`
Summary: Koha::RefundLostItemFeeRules->find() should require `branchcode`, `categoryco...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 18930 18936
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-16 12:59 UTC by Martin Renvoize
Modified: 2020-11-30 21:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-07-16 12:59:01 UTC
We overload the find method in Koha::RefundLostItemFeeRules but we only test with branchcode calls and do not pupulate the database with sufficient test data to show that find would fail in a number of cases where a different rule may be present for distinct itemtypes or categorycodes per branch.
Comment 1 Jonathan Druart 2019-08-06 13:22:02 UTC
I think this is done on bug 18936:

Koha/CirculationRules.pm

 54 our $RULE_KINDS = {
 55     refund => {
 56         scope => [ 'branchcode' ],
 57         default_value => 1,
 58     },
Comment 2 Jonathan Druart 2019-08-06 13:25:05 UTC
Also this rule must not exist in the DB for different categories or itemtypes, you can only define it (via the interface) for different libraries.
Comment 3 Katrin Fischer 2020-03-30 21:53:00 UTC
Can this be closed with bug 18936 pushed?
Comment 4 Martin Renvoize 2020-03-31 06:44:07 UTC
Good call.. lets close it.