In a consortia environment, some branches might want a process fee and others might not. This could be worked around with multiple item types, but that can cause other issues.
This enhancement will need to include a system preference to determine which branch's processing fees should be used. Further, that system preference should cover branch selection for lost item behavior generally. I've filed bug 39802.
Created attachment 187411 [details] [review] Bug 36506: Add lost_item_processing_fee rule and CRUD Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187412 [details] [review] Bug 36506: Database update Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187413 [details] [review] Bug 36506: Remove API mapping Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187414 [details] [review] Bug 36506: Remove process fee from itemtype administration Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187415 [details] [review] Bug 36506: DO NOT PUSH - SCHEMA UPDATES Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187416 [details] [review] Bug 36506: Use new rules in C4::Accounts This seems to be the only place processing fee is used, in chargelostitem This patch uses get_effective_rule_value, falling back to 0 if no rule. We also respect the new system preference, LostChargesControl, introduced in bug 39802 To test: 1 - Apply patch, updatedatabase, restart all 2 - Set a default/all branches processing rule for Books itemtype to 5 3 - Set a rule for branch 1 to 1 4 - Set a rule for branch 2 to 2 5 - Set a rule for branch 3 to 3 6 - Set a rule for branch 4 to 4 7 - Set LostChargesControl to 'library the patron is from' 8 - Check out a Books item from a different branch to a patron from branch 1 9 - Mark item lost, confirm processing fee is charged as 1 10 - Check out out a Books item from a different branch to a patron from branch 5 11 - Mark item lost, confirm processing fee is 5 12 - Set LostChargesControl to 'library you are logged in at' 13 - Check out a Books item from a different branch to a patron from branch 1 14 - Ensure you are logged in at branch 2 15 - Mark item lost, confirm processing fee is 2 16 - Set LostChargesControl to 'the library the item is from' 17 - Set HomeOrHoldingBranch to 'homebranch' 18 - Still at branch 2, check out a books item from branch 3 to a patron of branch 1, this ensure holdingbranch is not 3 19 - Mark item lost, confirm processing fee is 3 20 - Set HomeOrHoldingBranch to 'holdingbranch' 21 - Ensure you are logged in at branch 4 22 - Checkout an item from branch 1 to a patron from a different branch 23 - Mark item lost, confirm processing fee is 4 24 - Test other combos as you see fit 25 - Sign off! Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187417 [details] [review] Bug 36506: Adjust existing tests and test builder All the previously written tests should continue to pass. Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187418 [details] [review] Bug 36506: Unit tests Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Created attachment 187573 [details] [review] Bug 36506: Add lost_item_processing_fee rule and CRUD Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187574 [details] [review] Bug 36506: Database update Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187575 [details] [review] Bug 36506: Remove API mapping Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187576 [details] [review] Bug 36506: Remove process fee from itemtype administration Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187577 [details] [review] Bug 36506: DO NOT PUSH - SCHEMA UPDATES Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187578 [details] [review] Bug 36506: Use new rules in C4::Accounts This seems to be the only place processing fee is used, in chargelostitem This patch uses get_effective_rule_value, falling back to 0 if no rule. We also respect the new system preference, LostChargesControl, introduced in bug 39802 To test: 1 - Apply patch, updatedatabase, restart all 2 - Set a default/all branches processing rule for Books itemtype to 5 3 - Set a rule for branch 1 to 1 4 - Set a rule for branch 2 to 2 5 - Set a rule for branch 3 to 3 6 - Set a rule for branch 4 to 4 7 - Set LostChargesControl to 'library the patron is from' 8 - Check out a Books item from a different branch to a patron from branch 1 9 - Mark item lost, confirm processing fee is charged as 1 10 - Check out out a Books item from a different branch to a patron from branch 5 11 - Mark item lost, confirm processing fee is 5 12 - Set LostChargesControl to 'library you are logged in at' 13 - Check out a Books item from a different branch to a patron from branch 1 14 - Ensure you are logged in at branch 2 15 - Mark item lost, confirm processing fee is 2 16 - Set LostChargesControl to 'the library the item is from' 17 - Set HomeOrHoldingBranch to 'homebranch' 18 - Still at branch 2, check out a books item from branch 3 to a patron of branch 1, this ensure holdingbranch is not 3 19 - Mark item lost, confirm processing fee is 3 20 - Set HomeOrHoldingBranch to 'holdingbranch' 21 - Ensure you are logged in at branch 4 22 - Checkout an item from branch 1 to a patron from a different branch 23 - Mark item lost, confirm processing fee is 4 24 - Test other combos as you see fit 25 - Sign off! Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187579 [details] [review] Bug 36506: Adjust existing tests and test builder All the previously written tests should continue to pass. Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Created attachment 187580 [details] [review] Bug 36506: Unit tests Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>