[Bug 26593] New: Rental discounts are applied in wrong precedence order
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Bug ID: 26593 Summary: Rental discounts are applied in wrong precedence order Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org GetIssuingCharges uses its own private sub to choose the correct rental discount rule, specifying the rules returned in order: 1 - same library, same category, same itemtype 2 - all libraries, same category, same itemtype 3 - same library, same category, all itemtypes 4 - all libraries, same category, all itemtypes It doesn't match what the circ rules page says, and is missing several options: same library, same patron category, same item type same library, same patron category, all item types same library, all patron categories, same item type same library, all patron categories, all item types default (all libraries), same patron category, same item type default (all libraries), same patron category, all item types default (all libraries), all patron categories, same item type default (all libraries), all patron categories, all item types -- 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=26593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Hmm, I'm wondering if there was a deliberate reason behind this or whether it's just a historical mistake. -- 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=26593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- 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=26593 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=26593 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 113823 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113823&action=edit Bug 26593: Remove _get_discount_from_rule This patch remove the private sub used in GetIssuingCharges in favor of get_effective_rule It corrects the wrong precedence for rules and adds tests to cover this subroutine NOTE: the 'branch' for the discount will be determined by the signed in branch, this is a bug to be fixed in the future To test: 1 - Define a rentalcharge for an itemtype 2 - Define a 10% discount for library A, category A, all itemtypes 3 - Define a 50% discount for all libraries, category A, same itemtype 4 - Attempt to checkout an item from library A of the matching itemtype 5 - The 50% discount is applied 6 - Apply patches 7 - Attempt to checkout an item from library A of the matching itemtype 8 - The 10% discount is applied prove -v t/db_dependent/Circulation.t -- 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=26593 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |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=26593 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113823|0 |1 is obsolete| | --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114552&action=edit Bug 26593: Remove _get_discount_from_rule This patch remove the private sub used in GetIssuingCharges in favor of get_effective_rule It corrects the wrong precedence for rules and adds tests to cover this subroutine NOTE: the 'branch' for the discount will be determined by the signed in branch, this is a bug to be fixed in the future To test: 1 - Define a rentalcharge for an itemtype 2 - Define a 10% discount for library A, category A, all itemtypes 3 - Define a 50% discount for all libraries, category A, same itemtype 4 - Attempt to checkout an item from library A of the matching itemtype 5 - The 50% discount is applied 6 - Apply patches 7 - Attempt to checkout an item from library A of the matching itemtype 8 - The 10% discount is applied prove -v t/db_dependent/Circulation.t Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |victor@tuxayo.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114552|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 115013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115013&action=edit Bug 26593: Remove _get_discount_from_rule This patch remove the private sub used in GetIssuingCharges in favor of get_effective_rule It corrects the wrong precedence for rules and adds tests to cover this subroutine NOTE: the 'branch' for the discount will be determined by the signed in branch, this is a bug to be fixed in the future To test: 1 - Define a rentalcharge for an itemtype 2 - Define a 10% discount for library A, category A, all itemtypes 3 - Define a 50% discount for all libraries, category A, same itemtype 4 - Attempt to checkout an item from library A of the matching itemtype 5 - The 50% discount is applied 6 - Apply patches 7 - Attempt to checkout an item from library A of the matching itemtype 8 - The 10% discount is applied prove -v t/db_dependent/Circulation.t Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@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=26593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I could have sworn I'd already QA'd this a couple of months back! All works as expected.. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.02 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Cannot replicate issue on 20.05. Discounts are being applied correctly based on library when following test plan without . Not backporting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.02 |21.05.00,20.11.02,20.05.08 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Reverted a different patch and retested this one. Pushed to 20.05.x for 20.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lari.taskula@hypernova.fi --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 25115 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org