Bug 37807 - "Export today's checked in barcodes" not disabled when needed
Summary: "Export today's checked in barcodes" not disabled when needed
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on: 35402
Blocks:
  Show dependency treegraph
 
Reported: 2024-09-02 12:38 UTC by Jonathan Druart
Modified: 2024-10-02 09:56 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37807: Disable "Export today's checked in barcodes" when needed (1.65 KB, patch)
2024-09-02 12:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 37807: Disable "Export today's checked in barcodes" when needed (1.70 KB, patch)
2024-09-03 10:41 UTC, David Nind
Details | Diff | Splinter Review
Bug 37807: Disable "Export today's checked in barcodes" when needed (1.75 KB, patch)
2024-09-16 18:51 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-09-02 12:38:51 UTC
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.
Comment 1 Jonathan Druart 2024-09-02 12:41:14 UTC
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.
Comment 2 David Nind 2024-09-03 10:41:42 UTC
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>
Comment 3 David Nind 2024-09-03 10:44:44 UTC
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)
Comment 4 Nick Clemens (kidclamp) 2024-09-16 18:51:59 UTC
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>
Comment 5 Martin Renvoize (ashimema) 2024-10-02 09:56:22 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant