If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. In such case there should be an explanation / warning on the patron's details page and/or the meu item "Export today's checked in barcodes" should be grayed out.
Created attachment 44269 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. This patch skips the export if such privacy rule is set and dsiplays a message. To test: - Apply patch - Search for a user who has privacy rules set to never keeping a circulation history - Check out / check in in some items - On users detail page, go to More->Export today's checked in barcodes - Verify that a message appears about user's privacy settings - Click left tab "Circulation hsitory" - Verify that the same message appears - Seach for a user who allows circulation hsitory - repeat steps above, verify that circulation hsitory appears and that today's checkouts are exported.
Still applies.
This patch works as expected! My only concern/problem is that going to More->Export today's checked in barcodes for a patron with settings set to "never" for keeping a reading history opens in a new tab. It would be good to stay on the same tab instead of opening another one as this makes it confusing for the user and things get a bit messy!
Created attachment 45508 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. This patch skips the export if such privacy rule is set and dsiplays a message. To test: - Apply patch - Search for a user who has privacy rules set to never keeping a circulation history - Check out / check in in some items - On users detail page, go to More->Export today's checked in barcodes - Verify that a message appears about user's privacy settings (in same window) - Click left tab "Circulation history" - Verify that the same message appearsar - Verify the same with the other conditions that prevent the display of the user's circulation history: - Syspref 'intranetreadinghistory' is 'Don't allow' - Patron is 'Anonymous patron' (syspref 'Anonymous patron') - Search for a user who allows circulation history - repeat steps above, verify that circulation history appears (if allowed by syspref 'intranetreadinghistory' and that today's checkouts are exported. (Amended for comment #3)
When 'intranetreadinghistory' is set to "don't allow', the circulation history tab disappears - was this the intention? if yes, happy to sign off.
(In reply to Aleisha Amohia from comment #5) > When 'intranetreadinghistory' is set to "don't allow', the circulation > history tab disappears - was this the intention? if yes, happy to sign off. Just tested without patch, it is the same behaviour. The explanation of 'intranetreadinghistory' is "[Allow / don't] allow staff to access a patron's checkout history (it is stored regardless)." So it makes sense that the tab disappears when 'intranetreadinghistory' is set to "don't allow". However, the explanation is not precise ('it is stored regardless'), I think it should be something like ('it is stored regardless if the patron has allowed to keep the reading history'). - That would be something for a separate bug.
Created attachment 46501 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. This patch skips the export if such privacy rule is set and dsiplays a message. To test: - Apply patch - Search for a user who has privacy rules set to never keeping a circulation history - Check out / check in in some items - On users detail page, go to More->Export today's checked in barcodes - Verify that a message appears about user's privacy settings (in same window) - Click left tab "Circulation history" - Verify that the same message appearsar - Verify the same with the other conditions that prevent the display of the user's circulation history: - Syspref 'intranetreadinghistory' is 'Don't allow' - Patron is 'Anonymous patron' (syspref 'Anonymous patron') - Search for a user who allows circulation history - repeat steps above, verify that circulation history appears (if allowed by syspref 'intranetreadinghistory' and that today's checkouts are exported. (Amended for comment #3) Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
(In reply to Marc Véron from comment #6) > However, the explanation is not precise ('it is stored regardless'), I think > it should be something like ('it is stored regardless if the patron has > allowed to keep the reading history'). - That would be something for a > separate bug. See Bug 15552.
Comment on attachment 46501 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" Review of attachment 46501 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ +118,5 @@ > } > function export_barcodes() { > + [% IF ( > + ( ! Koha.Preference('intranetreadinghistory') ) || > + ( Koha.Preference('AnonymousPatron') == ( borrowernumber) ) || Could you detail this use case? If you are logged in with the anonymous patron why do you want to block the export? @@ +122,5 @@ > + ( Koha.Preference('AnonymousPatron') == ( borrowernumber) ) || > + ( privacy == 2 ) > + ) > + %] > + window.location = '/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %] ' ; I'd prefer to disable the button on the same way as we do for the "update child to adult patron" button.
Created attachment 46591 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. This patch does not allow to export in such case. To test: - Apply patch - Check out / check in in some items -Test toolbar: - On user's detail page, go to More->Export today's checked in barcodes - Verify that the menu item does not appear if syspref 'intranetreadinghistory' is set to 'Don't allow' - Verify that the menu item appears if syspref 'intranetreadinghistory' is set to allow and - that the menu item is grayed out with a tooltip if the user has set privacy settings to never keep a reading history - that the menu item works as before if user's privacy settings allow reading history. - Test left tab "Circulation history": - Verify that the left tab "Circulation history" does not appear if syspref 'intranetreadinghistory' is set to 'Don't allow' - Verify that the tab appars if syspref 'intranetreadinghistory' is set to 'Allow' and - that a message appears if user's privacy settings do not allow to keep the reading history - that the export works as before if user's privacy settings allow to keep the reading history (Amended and changed test plan for comment #9)
This patch needs a new sing-off. For new behaviour see new test plan (on patch).
Created attachment 46628 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. This patch does not allow to export in such case. To test: - Apply patch - Check out / check in in some items -Test toolbar: - On user's detail page, go to More->Export today's checked in barcodes - Verify that the menu item does not appear if syspref 'intranetreadinghistory' is set to 'Don't allow' - Verify that the menu item appears if syspref 'intranetreadinghistory' is set to allow and - that the menu item is grayed out with a tooltip if the user has set privacy settings to never keep a reading history - that the menu item works as before if user's privacy settings allow reading history. - Test left tab "Circulation history": - Verify that the left tab "Circulation history" does not appear if syspref 'intranetreadinghistory' is set to 'Don't allow' - Verify that the tab appars if syspref 'intranetreadinghistory' is set to 'Allow' and - that a message appears if user's privacy settings do not allow to keep the reading history - that the export works as before if user's privacy settings allow to keep the reading history (Amended and changed test plan for comment #9) Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Created attachment 47212 [details] [review] Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" If a patron's privacy settings are set to "Never" for keeping a reading history, "Export today's checked in barcodes" returns an empty file. This patch does not allow to export in such case. To test: - Apply patch - Check out / check in in some items -Test toolbar: - On user's detail page, go to More->Export today's checked in barcodes - Verify that the menu item does not appear if syspref 'intranetreadinghistory' is set to 'Don't allow' - Verify that the menu item appears if syspref 'intranetreadinghistory' is set to allow and - that the menu item is grayed out with a tooltip if the user has set privacy settings to never keep a reading history - that the menu item works as before if user's privacy settings allow reading history. - Test left tab "Circulation history": - Verify that the left tab "Circulation history" does not appear if syspref 'intranetreadinghistory' is set to 'Don't allow' - Verify that the tab appars if syspref 'intranetreadinghistory' is set to 'Allow' and - that a message appears if user's privacy settings do not allow to keep the reading history - that the export works as before if user's privacy settings allow to keep the reading history (Amended and changed test plan for comment #9) Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to Master - Should be in the May 2016 release. Thanks!