Summary: | Allow confirm/continue option to circulation warnings at checkout | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Circulation | Assignee: | Matt Blenkinsop <matt.blenkinsop> |
Status: | Needs documenting --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | alexandre.breton, aspencatteam, gmcharlt, kebliss, koha, kyle.m.hall, lucas, marjorie.barry-vila, martin.renvoize, matt.blenkinsop, nicole, nugged |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37345 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37862 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron.
**Sponsored by** *ByWater Solutions*, *Colorado Library Consortium (CLIC)*, *Panhandle Public Library Cooperative* and *Arcadia Public Library*
|
|
Version(s) released in: |
24.11.00
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 39183, 39422 | ||
Attachments: |
Bug 14787: Remember confirmations for a patron session
Bug 14787: Fix tidying issue in circulation.pl Bug 14787: Remember confirmations for a patron session Bug 14787: Fix tidying issue in circulation.pl Bug 14787: Remember confirmations for a patron session Bug 14787: Fix tidying issue in circulation.pl Bug 14787: Remember confirmations for a patron session Bug 14787: Fix tidying issue in circulation.pl Bug 14787: Remember confirmations for a patron session Bug 14787: Fix tidying issue in circulation.pl Bug 14787: Remember confirmations for a patron session Bug 14787: Fix tidying issue in circulation.pl |
Description
Nicole C. Engard
2015-09-04 14:05:56 UTC
*** Bug 14728 has been marked as a duplicate of this bug. *** *** Bug 16943 has been marked as a duplicate of this bug. *** *** Bug 18021 has been marked as a duplicate of this bug. *** Created attachment 167656 [details] [review] Bug 14787: Remember confirmations for a patron session This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron. Test plan: We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected 1) In system preferences set RentalFeesCheckoutConfirmation to 'ask' 2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM' 3) A dialog should display asking you to confirm the checkout. 4) There should be a checkbox on the dialog to "Remember for the session for this patron" 5) Click Yes, checkout out without checking this checkbox 6) Select another item and checkout - the dialog should display again 7) This time, check the checkbox and click Yes, check out 8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this) 9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session 10) Choose a new patron 11) Repeat steps 2 - 9 12) It should work as outlined above 13) Sign off! Created attachment 167657 [details] [review] Bug 14787: Fix tidying issue in circulation.pl There are large blocks of code in circulation.pl that are incorrectly indented. This means any new code placed within those blocks fails the QA tests as it automatically adds new untidy lines. This patch tidies the file to remove this issue and start from a clean position in terms of tidyness. Created attachment 171183 [details] [review] Bug 14787: Remember confirmations for a patron session This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron. Test plan: We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected 1) In system preferences set RentalFeesCheckoutConfirmation to 'ask' 2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM' 3) A dialog should display asking you to confirm the checkout. 4) There should be a checkbox on the dialog to "Remember for the session for this patron" 5) Click Yes, checkout out without checking this checkbox 6) Select another item and checkout - the dialog should display again 7) This time, check the checkbox and click Yes, check out 8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this) 9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session 10) Choose a new patron 11) Repeat steps 2 - 9 12) It should work as outlined above 13) Sign off! Created attachment 171184 [details] [review] Bug 14787: Fix tidying issue in circulation.pl There are large blocks of code in circulation.pl that are incorrectly indented. This means any new code placed within those blocks fails the QA tests as it automatically adds new untidy lines. This patch tidies the file to remove this issue and start from a clean position in terms of tidyness. Rebased on main Created attachment 173224 [details] [review] Bug 14787: Remember confirmations for a patron session This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron. Test plan: We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected 1) In system preferences set RentalFeesCheckoutConfirmation to 'ask' 2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM' 3) A dialog should display asking you to confirm the checkout. 4) There should be a checkbox on the dialog to "Remember for the session for this patron" 5) Click Yes, checkout out without checking this checkbox 6) Select another item and checkout - the dialog should display again 7) This time, check the checkbox and click Yes, check out 8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this) 9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session 10) Choose a new patron 11) Repeat steps 2 - 9 12) It should work as outlined above 13) Sign off! Created attachment 173225 [details] [review] Bug 14787: Fix tidying issue in circulation.pl There are large blocks of code in circulation.pl that are incorrectly indented. This means any new code placed within those blocks fails the QA tests as it automatically adds new untidy lines. This patch tidies the file to remove this issue and start from a clean position in terms of tidyness. Created attachment 173412 [details] [review] Bug 14787: Remember confirmations for a patron session This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron. Test plan: We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected 1) In system preferences set RentalFeesCheckoutConfirmation to 'ask' 2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM' 3) A dialog should display asking you to confirm the checkout. 4) There should be a checkbox on the dialog to "Remember for the session for this patron" 5) Click Yes, checkout out without checking this checkbox 6) Select another item and checkout - the dialog should display again 7) This time, check the checkbox and click Yes, check out 8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this) 9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session 10) Choose a new patron 11) Repeat steps 2 - 9 12) It should work as outlined above 13) Sign off! Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Created attachment 173413 [details] [review] Bug 14787: Fix tidying issue in circulation.pl There are large blocks of code in circulation.pl that are incorrectly indented. This means any new code placed within those blocks fails the QA tests as it automatically adds new untidy lines. This patch tidies the file to remove this issue and start from a clean position in terms of tidyness. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Created attachment 173559 [details] [review] Bug 14787: Remember confirmations for a patron session This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron. Test plan: We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected 1) In system preferences set RentalFeesCheckoutConfirmation to 'ask' 2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM' 3) A dialog should display asking you to confirm the checkout. 4) There should be a checkbox on the dialog to "Remember for the session for this patron" 5) Click Yes, checkout out without checking this checkbox 6) Select another item and checkout - the dialog should display again 7) This time, check the checkbox and click Yes, check out 8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this) 9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session 10) Choose a new patron 11) Repeat steps 2 - 9 12) It should work as outlined above 13) Sign off! Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 173560 [details] [review] Bug 14787: Fix tidying issue in circulation.pl There are large blocks of code in circulation.pl that are incorrectly indented. This means any new code placed within those blocks fails the QA tests as it automatically adds new untidy lines. This patch tidies the file to remove this issue and start from a clean position in terms of tidyness. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Whilst this is code from my team, it's not code I'd fully reviewed and tested until now. It's all working well and there are no regressions. Passing QA We have a conflict in circulation.pl that I am not confident to resolve. Please rebase ASAP. Created attachment 173720 [details] [review] Bug 14787: Remember confirmations for a patron session This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron. Test plan: We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected 1) In system preferences set RentalFeesCheckoutConfirmation to 'ask' 2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM' 3) A dialog should display asking you to confirm the checkout. 4) There should be a checkbox on the dialog to "Remember for the session for this patron" 5) Click Yes, checkout out without checking this checkbox 6) Select another item and checkout - the dialog should display again 7) This time, check the checkbox and click Yes, check out 8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this) 9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session 10) Choose a new patron 11) Repeat steps 2 - 9 12) It should work as outlined above 13) Sign off! Created attachment 173721 [details] [review] Bug 14787: Fix tidying issue in circulation.pl There are large blocks of code in circulation.pl that are incorrectly indented. This means any new code placed within those blocks fails the QA tests as it automatically adds new untidy lines. This patch tidies the file to remove this issue and start from a clean position in terms of tidyness. Pushed for 24.11! Well done everyone, thank you! Enhancement won't be backported to 24.05.x We probably should have follow up for this, some notes for not to lose the point: my $patron_session_confirmation = $query->cookie('patronSessionConfirmation') || undef; - why screening it to undef? protecting for "" and 0? my ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 ); - split of undef leads to: [2025/04/28 16:40:52] [WARN] Use of uninitialized value $patron_session_confirmation in split at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line ... my $patron_match = $borrowernumber == $patron_for_session; - numeric == with undef or '' leads to: [2025/04/28 16:40:52] [WARN] Use of uninitialized value $patron_for_session in numeric eq (==) at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line ... my @conf_keys = split( /\|/, $session_confirmations ); - and this will make warning: [2025/04/28 16:40:52] [WARN] Use of uninitialized value $session_confirmations in split at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line ... I'd solve this way (but this is "local solution just for this block" :) ) -> ``` my ( $patron_for_session, $session_confirmations, $patron_match ); my @conf_keys; my $patron_session_confirmation = $query->cookie('patronSessionConfirmation') || undef; if ($patron_session_confirmation) { ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 ); $patron_match = $borrowernumber == $patron_for_session; @conf_keys = split( /\|/, $session_confirmations ); } $template_params->{sessionConfirmationKeys} = (); ``` Please fix on new and separate bug reports as this has already been released. |