[Bug 19804] New: Suspension calcultation doesn't honour ' Fine charging interval'
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Bug ID: 19804 Summary: Suspension calcultation doesn't honour 'Fine charging interval' Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: hagud@orex.es QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When a user is returning an item with overudue, the suspension is calculated in days according 'suspensions in day' it doesn't calculate the 'Fine charging interval' that I guess is used for € fines, but doesn't apply to suspensions in day. Not all libraries has a relation > 1 to days and suspensions, for example now it is not possible to define 7 days of suspension for every 14. It should be nice if Koha also consider the 'Fine charging interval' for suspensions in days and library could decide to change the suspension, every 1, 2 ... days -- 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=19804 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=19804 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69783 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69783&action=edit Bug 19804: Add new DB column issuingrules.suspension_chargeperiod -- 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=19804 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69784 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69784&action=edit Bug 19804: DBIC Schema changes -- 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=19804 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69785 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69785&action=edit Bug 19804: Add a 'Fine charging interval' for suspension days We already have a chargeperiod (Fine charging interval) value which is taken into account for fine ($) for not for the suspension period. This patch adds a new column suspension_chargeperiod (Fine day charging interval) to add the same behaviour when a suspension is calculated. Test plan: Add overdue item and play with the circulation rules (and the calendar). The suspension period must be correctly calculated. Please provide the different tests you made. -- 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=19804 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69786 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69786&action=edit Bug 19804: Add the new column to the circ rules interface -- 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=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Suspension calcultation |Suspension calculation |doesn't honour 'Fine |doesn't honour 'Fine |charging interval' |charging interval' CC| |katrin.fischer@bsz-bw.de -- 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=19804 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.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=19804 --- Comment #5 from Hugo Agud <hagud@orex.es> --- Good morning I have insall the patch into kohadev, I have checked out and checked in several items with different configuration and it works.. I have created a rule of 1 suspension day for every 2 delay Case 1 Cumulative on Calendar without holidays--> works as espected Calendar with holiday --> work as expected Cumulative off Calendar without holidays --> works as expected Calendar with holidays --> works as expected I missed something to check, if not I will sign it asap -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69783|0 |1 is obsolete| | --- Comment #6 from Hugo Agud <hagud@orex.es> --- Created attachment 70404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70404&action=edit Bug 19804: Add new DB column issuingrules.suspension_chargeperiod Signed-off-by: Hugo Agud <hagud@orex.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69784|0 |1 is obsolete| | --- Comment #7 from Hugo Agud <hagud@orex.es> --- Created attachment 70405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70405&action=edit Bug 19804: DBIC Schema changes Signed-off-by: Hugo Agud <hagud@orex.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69785|0 |1 is obsolete| | --- Comment #8 from Hugo Agud <hagud@orex.es> --- Created attachment 70406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70406&action=edit Bug 19804: Add a 'Fine charging interval' for suspension days We already have a chargeperiod (Fine charging interval) value which is taken into account for fine ($) for not for the suspension period. This patch adds a new column suspension_chargeperiod (Fine day charging interval) to add the same behaviour when a suspension is calculated. Test plan: Add overdue item and play with the circulation rules (and the calendar). The suspension period must be correctly calculated. Please provide the different tests you made. Signed-off-by: Hugo Agud <hagud@orex.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69786|0 |1 is obsolete| | --- Comment #9 from Hugo Agud <hagud@orex.es> --- Created attachment 70407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70407&action=edit Bug 19804: Add the new column to the circ rules interface Signed-off-by: Hugo Agud <hagud@orex.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Jonathan, the atomicupdate should set an initial value for existing rules, based on chargeperiod. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Tomás Cohen Arazi from comment #10)
Jonathan, the atomicupdate should set an initial value for existing rules, based on chargeperiod.
It's done already, "DEFAULT "1"' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19204 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Some tiny things: - number of tests needs to be 114 for them to pass - the headings at the top and the bottom row of the circulation rules table don't match up - Maybe rename "Fine day charging interval" to "Suspension charging interval" to match a bit more with the other related columns? - Adding a see also for bug 19204 - it's obvious here too, that calendar is ignored. Can you provide a quick follow up? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70406|0 |1 is obsolete| | Attachment #70407|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73665&action=edit Bug 19804: Add a 'Fine charging interval' for suspension days We already have a chargeperiod (Fine charging interval) value which is taken into account for fine ($) for not for the suspension period. This patch adds a new column suspension_chargeperiod (Fine day charging interval) to add the same behaviour when a suspension is calculated. Test plan: Add overdue item and play with the circulation rules (and the calendar). The suspension period must be correctly calculated. Please provide the different tests you made. Signed-off-by: Hugo Agud <hagud@orex.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73666&action=edit Bug 19804: Add the new column to the circ rules interface Signed-off-by: Hugo Agud <hagud@orex.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73667 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73667&action=edit Bug 19804: (follow-up) Fix wording and columns order -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #12)
Some tiny things:
- number of tests needs to be 114 for them to pass
Patch amended.
- the headings at the top and the bottom row of the circulation rules table don't match up - Maybe rename "Fine day charging interval" to "Suspension charging interval" to match a bit more with the other related columns?
Done, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Joubu, running out of time for testing this morning, but have 2 questions I want to note: 1) For the fine charging interval we multiply: Days overdue / fine charging interval * fine The equivalence would then be: Days overdue / suspension charging interval * suspension in days But that's not quite what this does, is it? 2) I have backdated an item on checkout to be immediately overdue, but on return no restriction was created. Can you add a more detailed test plan? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #17)
Hi Joubu,
running out of time for testing this morning, but have 2 questions I want to note:
1) For the fine charging interval we multiply: Days overdue / fine charging interval * fine
The equivalence would then be: Days overdue / suspension charging interval * suspension in days
But that's not quite what this does, is it?
Yes it is what it does, take a look at the tests: 1795 # We want to charge 2 days every day, without grace 1796 # With 5 days of overdue: 5 * Z (Z is a typo for 2 I guess..) 1814 # We want to charge 2 days every 2 days, without grace 1815 # With 5 days of overdue: (5 * 2) / 2 1836 # We want to charge 2 days every 3 days, with 1 day of grace 1837 # With 5 days of overdue: ((5-1) / 3 ) * 2
2) I have backdated an item on checkout to be immediately overdue, but on return no restriction was created. Can you add a more detailed test plan?
Today is April 6th, I set: Suspension in days (day): 3 Suspension charging interval: 2 Which means: charge 3 days every 2 days. Check an item in with a due date on April 2nd (4 days of overdue) We are expecting: 3*4/2 = 6 days of suspension And I get: "Restricted: Patron's account is restricted until 12/04/2018" \o/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It was me, the devbox had the wrong time and I made a mistake in the circulation conditions... *sigh* - But the good news is the patch working :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70404|0 |1 is obsolete| | --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 73830 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73830&action=edit Bug 19804: Add new DB column issuingrules.suspension_chargeperiod Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70405|0 |1 is obsolete| | --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 73831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73831&action=edit Bug 19804: DBIC Schema changes Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73665|0 |1 is obsolete| | --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 73832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73832&action=edit Bug 19804: Add a 'Fine charging interval' for suspension days We already have a chargeperiod (Fine charging interval) value which is taken into account for fine ($) for not for the suspension period. This patch adds a new column suspension_chargeperiod (Fine day charging interval) to add the same behaviour when a suspension is calculated. Test plan: Add overdue item and play with the circulation rules (and the calendar). The suspension period must be correctly calculated. Please provide the different tests you made. Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73666|0 |1 is obsolete| | --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 73833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73833&action=edit Bug 19804: Add the new column to the circ rules interface Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73667|0 |1 is obsolete| | --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 73834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73834&action=edit Bug 19804: (follow-up) Fix wording and columns order Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Suspension calculation |Suspension calculation |doesn't honour 'Fine |doesn't honor 'Suspension |charging interval' |charging interval' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #25 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.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=19804 --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73894 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73894&action=edit Bug 19804: Fix test in GetHardDueDate.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #27 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 73895 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73895&action=edit Bug 19804: Fix test in maxsuspensiondays.t We do not want a random value of suspension_chargeperiod from TestBuilder -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 --- Comment #28 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Last two patches pushed to master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Niamh <niamh.walker-headon@it-tallaght.ie> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |niamh.walker-headon@it-tall | |aght.ie -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19804 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |FIXED Status|Pushed to Master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org