[Bug 12448] New: Ask for confirmation when checking out an item with rental fees
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Bug ID: 12448 Summary: Ask for confirmation when checking out an item with rental fees Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: maxime.beaulieu@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Prompts the user for confirmation when checking out an item with rental fees. This patch adds a confirmation box between the toolbar and the checkout form on the checkout page when checking out an item with rental fees. A system preference is added to manage the patch's behaviour. The preference's value can either be set to "ask" or "don't ask" and is located under: Circulation preferences > Checkout Policy > RentalFeesCheckoutConfirmation Sponsor: Ville de Victoriaville, QC Confirmation box contents: "Please confirm checkout" "-Rental charge for this item: n" [Yes, checkout (Y)] [No, Don't Check Out (N)] Test case A: Confirm checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click on the "Yes" button. 6) Item is added to checkout list. 7) Fees are added to the patron's account. Test case B: Decline checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click the "No" button. 6) Checkout page goes back to its initial state. 7) Patron has no item checked out and no fees to pay. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.begin@inLibro.com, | |francois.charbonnier@inlibr | |o.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #1 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 28954 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28954&action=edit Bug 12448 - Ask for confirmation when checking out an item with rental fees Prompts the user for confirmation when checking out an item with rental fees. This patch adds a confirmation box between the toolbar and the checkout form on the checkout page when checking out an item with rental fees. A system preference is added to manage the patch's behaviour. The preference's value can either be set to "ask" or "don't ask" and is located under: Circulation preferences > Checkout Policy > RentalFeesCheckoutConfirmation Sponsor: Ville de Victoriaville, QC Confirmation box contents: "Please confirm checkout" "-Rental charge for this item: n" [Yes, checkout (Y)] [No, Don't Check Out (N)] Test case A: Confirm checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click on the "Yes" button. 6) Item is added to checkout list. 7) Fees are added to the patron's account. Test case B: Decline checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click the "No" button. 6) Checkout page goes back to its initial state. 7) Patron has no item checked out and no fees to pay. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |cbrannon@cdalibrary.org --- Comment #2 from Christopher Brannon <cbrannon@cdalibrary.org> --- Maxime, Functionally, the patch works as described. A few issues need to be addressed. First, to maintain consistent behavior, I think the default for the RentalFeesCheckoutConfirmation preference should be Don't Ask. Next, below is the message that popped up: Please confirm checkout The patron has a debt of 3.00 Rental charge for this item : 5,00 $ Need the currency symbol ($) in front of what the patron already owes. Add period at the end of the first sentence. Change comma to decimal in the rental charge. Move currency symbol on charge to the front of price. ($5.00) Remove space before colon. Ideally, the message should be formatted to look like this: Please confirm checkout The patron has a debt of $3.00. Rental charge for this item: $5.00 Christopher -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but please don't include a currency symbol at all. Not everyone is using $. What we ideally would need is a new template toolkit plugin to format amounts correctly and put the currency symbols in the right spot. But that would be a bit outside the scope of this bug and so being consistent with the rest of Koha would be ok. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Looking at the code I spotted another problem: my $sth = $dbh->prepare("SELECT rentalcharge FROM itemtypes WHERE itemtype = ?"); is used to get the rentalcharge - but this doesn't take into account the circulation conditions, where you can define a discount for the rental that will influence how much the borrower has to pay. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #5 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Katrin Fischer from comment #3)
I am sorry, but please don't include a currency symbol at all.
Not everyone is using $. What we ideally would need is a new template toolkit plugin to format amounts correctly and put the currency symbols in the right spot. But that would be a bit outside the scope of this bug and so being consistent with the rest of Koha would be ok.
Sorry Katrin, I hadn't noticed that behavior in Koha. Aside from that, the other formatting should still be adjusted, correct? Christopher -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- No worries, Christoper, it would nice to have nicer formatting for the currencies :) Yes, decimal point is alright. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #7 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29123 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29123&action=edit Bug 12448 - Fixes: confirmation when checking out an item with rental fees Fixes: Default behaviour changed to "Don't ask". Adressed the punctuation issues. Removed the currency symbols in the warning message. Using "GetIssuingCharges()" to calculate the correct charge amount, including applicable discounts. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28954|0 |1 is obsolete| | Attachment #29123|0 |1 is obsolete| | --- Comment #8 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29124 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29124&action=edit Bug 12448 - Fixes: confirmation when checking out an item with rental fees Fixes: Default behaviour changed to "Don't ask". Adressed the punctuation issues. Removed the currency symbols in the warning message. Using "GetIssuingCharges()" to calculate the correct charge amount, including applicable discounts. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28954|1 |0 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #9 from Marc Véron <veron@veron.ch> --- There is a small typo in sysprefs.sql 'Allow user to confirme when checking out an item with rental fees.' (confirm) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #10 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29182 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29182&action=edit Bug 12448 - Fixed a typo in sysprefs -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #11 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28954|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29124|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29182|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #12 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29311 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29311&action=edit Bug 12448 - Ask for confirmation when checking out an item with rental fees Prompts the user for confirmation when checking out an item with rental fees. This patch adds a confirmation box between the toolbar and the checkout form on the checkout page when checking out an item with rental fees. A system preference is added to manage the patch's behaviour. The preference's value can either be set to "ask" or "don't ask" and is located under: Circulation preferences > Checkout Policy > RentalFeesCheckoutConfirmation Sponsor: Ville de Victoriaville, QC Confirmation box contents: "Please confirm checkout" "-Rental charge for this item: n" [Yes, checkout (Y)] [No, Don't Check Out (N)] Test case A: Confirm checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click on the "Yes" button. 6) Item is added to checkout list. 7) Fees are added to the patron's account. Test case B: Decline checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click the "No" button. 6) Checkout page goes back to its initial state. 7) Patron has no item checked out and no fees to pay. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #13 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29312 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29312&action=edit Bug 12448 - Fixes: confirmation when checking out an item with rental fees Fixes: Default behaviour changed to "Don't ask". Adressed the punctuation issues. Removed the currency symbols in the warning message. Using "GetIssuingCharges()" to calculate the correct charge amount, including applicable discounts. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #14 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29313 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29313&action=edit Bug 12448 - Fixed a typo in sysprefs Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #15 from Christopher Brannon <cbrannon@cdalibrary.org> --- Please double check the default setting of RentalFeesCheckoutConfirmation. I signed off on the feature, but could not confirm if it was my setup. It does not look like it is defaulting. Sorry, forgot to check on last testing. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #16 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- The default value was set to '0' the 'Fixed a typo' patch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #17 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Maxime Beaulieu from comment #16)
The default value was set to '0' the 'Fixed a typo' patch.
I would ask that someone else confirm that the preference is defaulting to "Don't Ask" before we move forward. As I said, I can't confirm that it works. Christopher -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #18 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Requesting signoff for the default behaviour. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #19 from Marc Véron <veron@veron.ch> --- I tested. After updating the database, the value of 'RentalFeesCheckoutConfirmation' was set to 1. Reason: The default value of the system preference is set to '0' in sysprefs.sql, but not in updatedatabase.pl. Same for the typo. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #20 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29361 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29361&action=edit Bug 12448 - I have set the appropriate default and corrected the typo in updatedatabase. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #21 from Marc Véron <veron@veron.ch> --- Tested following Testplan in comment #1 Works as expected. Sing-offs for single patches follow. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #22 from Marc Véron <veron@veron.ch> --- Created attachment 29362 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29362&action=edit [Signed-off] Bug 12448 - Ask for confirmation when checking out an item with rental fees Prompts the user for confirmation when checking out an item with rental fees. This patch adds a confirmation box between the toolbar and the checkout form on the checkout page when checking out an item with rental fees. A system preference is added to manage the patch's behaviour. The preference's value can either be set to "ask" or "don't ask" and is located under: Circulation preferences > Checkout Policy > RentalFeesCheckoutConfirmation Sponsor: Ville de Victoriaville, QC Confirmation box contents: "Please confirm checkout" "-Rental charge for this item: n" [Yes, checkout (Y)] [No, Don't Check Out (N)] Test case A: Confirm checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click on the "Yes" button. 6) Item is added to checkout list. 7) Fees are added to the patron's account. Test case B: Decline checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click the "No" button. 6) Checkout page goes back to its initial state. 7) Patron has no item checked out and no fees to pay. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> All patches applied. Works as expected. Sign-off on patch #1 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29311|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #23 from Marc Véron <veron@veron.ch> --- Created attachment 29363 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29363&action=edit [Signed-off] Bug 12448 - Fixes: confirmation when checking out an item with rental fees Fixes: Default behaviour changed to "Don't ask". Adressed the punctuation issues. Removed the currency symbols in the warning message. Using "GetIssuingCharges()" to calculate the correct charge amount, including applicable discounts. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29313|0 |1 is obsolete| | --- Comment #24 from Marc Véron <veron@veron.ch> --- Created attachment 29364 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29364&action=edit Bug 12448 - Fixed a typo in sysprefs Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29312|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #25 from Marc Véron <veron@veron.ch> --- Created attachment 29367 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29367&action=edit [Signed-off] Bug 12448 - Fixed a typo in sysprefs Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29364|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #26 from Marc Véron <veron@veron.ch> --- Created attachment 29368 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29368&action=edit [Signed-off] Bug 12448 - I have set the appropriate default and corrected the typo in updatedatabase. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29361|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #27 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29362|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29363|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29367|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29368|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #28 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29371 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29371&action=edit Bug 12448 - Ask for confirmation when checking out an item with rental fees Prompts the user for confirmation when checking out an item with rental fees. This patch adds a confirmation box between the toolbar and the checkout form on the checkout page when checking out an item with rental fees. A system preference is added to manage the patch's behaviour. The preference's value can either be set to "ask" or "don't ask" and is located under: Circulation preferences > Checkout Policy > RentalFeesCheckoutConfirmation Sponsor: Ville de Victoriaville, QC Confirmation box contents: "Please confirm checkout" "-Rental charge for this item: n" [Yes, checkout (Y)] [No, Don't Check Out (N)] Test case A: Confirm checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click on the "Yes" button. 6) Item is added to checkout list. 7) Fees are added to the patron's account. Test case B: Decline checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click the "No" button. 6) Checkout page goes back to its initial state. 7) Patron has no item checked out and no fees to pay. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> All patches applied. Works as expected. Sign-off on patch #1 Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #29 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29372 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29372&action=edit Bug 12448 - Fixes: confirmation when checking out an item with rental fees Fixes: Default behaviour changed to "Don't ask". Adressed the punctuation issues. Removed the currency symbols in the warning message. Using "GetIssuingCharges()" to calculate the correct charge amount, including applicable discounts. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #30 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29373 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29373&action=edit Bug 12448 - Fixed a typo in sysprefs Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #31 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 29374 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29374&action=edit Bug 12448 - I have set the appropriate default and corrected the typo in updatedatabase. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #32 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I feel like it would be better to check for the preference first, so the database is only queried for the rental fee, if it's needed. What do you think? This is the code from the squashed patches: + # + # CHECK IF THERE IS RENTAL CHARGES. RENTAL MUST BE CONFIRMED BY THE BORROWER + # + my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); + my $rentalConfirmation = C4::Context->preference("RentalFeesCheckoutConfirmation"); + + if ( $rentalConfirmation && $rentalCharge != 0 ) + { + $rentalCharge = sprintf("%.02f", $rentalCharge); + $needsconfirmation{RENTALCHARGE} = $rentalCharge; + } For the pref description I think maybe it should be: ask/don't ask 'for confirmation' instead of 'a confirmation'. But as I am not a native speaker myself, you might want to check that with one :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #33 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29543 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29543&action=edit Bug 12448 - Follow-up to Comment 32. In C4/Circulation.pm, 'GetIssuingCharges' is now called after the syspref is checked. The text for the system preference now reads "When checking out an item with rental fees [ask/don't ask] for confirmation. modified: C4/Circulation.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #34 from Marc Véron <veron@veron.ch> --- Sorry, it doesn't apply on current master (3.17.00.010) Applying: Bug 12448 - Ask for confirmation when checking out an item with rental fees Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql Failed to merge in the changes. Patch failed at 0001 Bug 12448 - Ask for confirmation when checking out an item with rental fees -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29371|0 |1 is obsolete| | Attachment #29372|0 |1 is obsolete| | Attachment #29373|0 |1 is obsolete| | Attachment #29374|0 |1 is obsolete| | Attachment #29543|0 |1 is obsolete| | --- Comment #35 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 30307 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30307&action=edit Bug 12448 - New patch for master v3.17.00.010 Squashed commit of everything there was before. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master Assignee|koha-bugs@lists.koha-commun |maxime.beaulieu@inlibro.com |ity.org | --- Comment #36 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Maxime, please remember to assign bugs to yourself, when you are working on them/providing patches, thx! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #37 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Maxime, we try to avoid squashing patches, when it would mean to lose sign-off lines or a mix up of authorship of the code. The code in your squashed patch looks perfectly fine, but now we are missing the sign-off lines from Christopher and Marc. A follow-up would have worked better in this case. I am switching back to Needs Signoff for now - if Marc or Christopher are ok with it, I can also add back their lines, but didn't want to add them to changed code without their permission. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #38 from Marc Véron <veron@veron.ch> --- Created attachment 30515 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30515&action=edit [Signed-off] Bug 12448 - New patch for master v3.17.00.010 Squashed commit of everything there was before. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30307|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30862 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30862&action=edit [PASSED QA] Bug 12448: Ask for confirmation when checking out an item with rental fees Sponsored-by: Ville de Victoriaville, QC Confirmation box contents: "Please confirm checkout" "-Rental charge for this item: n" [Yes, check out (Y)] [No, Don't Check Out (N)] Test case A: Confirm checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click on the "Yes" button. 6) Item is added to checkout list. 7) Fees are added to the patron's account. Test case B: Decline checkout 1) Go to checkout user "X"'s checkout page. 2) Enter barcode for an item with rental fees. 3) Click the "Check out" button. 4) Confirmation box appears. 5) Click the "No" button. 6) Checkout page goes back to its initial state. 7) Patron has no item checked out and no fees to pay. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> With the system preference RentalFeesCheckoutConfirmation set to "don't ask" there is no change in behaviour. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30515|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #40 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have amended the commit message, added the test plan and sponsored-by line back. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #41 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but I found a problem: checking out an item with 0.00 also requires confirmation now. That should not be the case. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12776 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #42 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30864 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30864&action=edit Bug 12448: Follow-up: Only ask confirmation when rental charge > 0 To test: - Check out an item with no rental charge - Verify no confirmation message appears - Check out an item with rental charge - Verify rental charge shows -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #43 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Leaving it to Tomas if this is tiny enough for a QA follow-up or requires another sign off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #44 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #45 from Jonathan Druart <jonathan.druart@biblibre.com> --- The updatedb entry refers to bug 11169. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12448 --- Comment #46 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 33434 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33434&action=edit Bug 12448: (RM followup) fix bug number in updatedatabase.pl Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org