If patron has privacy==2 ("Never: Delete my history immediately"), the "Export today's checked in barcodes" button is supposed to be disabled, with a tooltip with an explanation, but it is not.
Created attachment 170938 [details] [review] Bug 37807: Disable "Export today's checked in barcodes" when needed If patron has privacy==2 ("Never: Delete my history immediately"), the "Export today's checked in barcodes" button is supposed to be disabled, with a tooltip with an explanation, but it is not. Test plan: Turn on OpacPrivacy and select "Never" in your privacy settings (OPAC) Go to the circulation page for this patron (staff) and notice that the export button (under "More") is disabled and has a tooltip when the mouse hover it.
Created attachment 170975 [details] [review] Bug 37807: Disable "Export today's checked in barcodes" when needed If patron has privacy==2 ("Never: Delete my history immediately"), the "Export today's checked in barcodes" button is supposed to be disabled, with a tooltip with an explanation, but it is not. Test plan: Turn on OpacPrivacy and select "Never" in your privacy settings (OPAC) Go to the circulation page for this patron (staff) and notice that the export button (under "More") is disabled and has a tooltip when the mouse hover it. Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): Before the patch ---------------- 1. Set OPACPrivacy to 'Allow' 2. Log in to the OPAC (I just used koha). 3. Go to Your account > Privacy 4. Choose 'Never' for the privacy rule. 5. You get an error: Exception 'Koha::Exceptions::SysPref::NotSet' thrown 'Required syspref is not set' with syspref => AnonymousPatron at /usr/share/perl5/Exception/Class/Base.pm line 88 in Exception::Class::Base::throw at /usr/share/perl5/Exception/Class/Base.pm line 88 6. Set AnonymousPatron to any patron - I set as 19. (opacreadinghistory was already set to allow) 7. Refresh the OPAC page. 8. Go to the staff interface > Patrons > search for koha 9. Note that for More > Export today's checkin in barcodes, that: - the option is not greyed out - when you select it, it opens a new tab on the oatron's circulation history page (/cgi-bin/koha/members/readingrec.pl?borrowernumber=51&op=export_barcodes) - the page displays the message "This patron has set the privacy rules to never keeping a circulation history." - if you keep going to More > Export today's checkin in barcodes, it opens a new tab every time - there was no tooltip for me on the menu item After the patch --------------- 1. Applied the patch, restarted everything, and cleared the browser cache 2. Everything now works as expected: - More > Export today's checked in barcodes is greyed out - There is now a tooltip "Not allowed by patron's privacy settings" - If you go to the patron's circulation history page, it says "This patron has set the privacy rules to never keeping a circulation history." - All the privacy options seem to work OK (I didn't add any transactions to actually test with data)
Created attachment 171596 [details] [review] Bug 37807: Disable "Export today's checked in barcodes" when needed If patron has privacy==2 ("Never: Delete my history immediately"), the "Export today's checked in barcodes" button is supposed to be disabled, with a tooltip with an explanation, but it is not. Test plan: Turn on OpacPrivacy and select "Never" in your privacy settings (OPAC) Go to the circulation page for this patron (staff) and notice that the export button (under "More") is disabled and has a tooltip when the mouse hover it. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant