Bug 15096 - Export today's checked in barcodes: Display warning if reading history is set to "never"
Summary: Export today's checked in barcodes: Display warning if reading history is set...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-31 19:53 UTC by Marc Véron
Modified: 2017-06-14 22:08 UTC (History)
4 users (show)

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


Attachments
Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" (4.03 KB, patch)
2015-10-31 20:41 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" (5.42 KB, patch)
2015-12-08 19:00 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" (5.47 KB, patch)
2016-01-11 21:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" (6.23 KB, patch)
2016-01-13 14:48 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" (6.28 KB, patch)
2016-01-13 23:56 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" (6.33 KB, patch)
2016-01-22 18:03 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-10-31 19:53:31 UTC
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.
Comment 1 Marc Véron 2015-10-31 20:41:04 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-12-01 15:46:32 UTC
Still applies.
Comment 3 Aleisha Amohia 2015-12-01 22:11:52 UTC
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!
Comment 4 Marc Véron 2015-12-08 19:00:04 UTC Comment hidden (obsolete)
Comment 5 Aleisha Amohia 2016-01-10 23:36:01 UTC
When 'intranetreadinghistory' is set to "don't allow', the circulation history tab disappears - was this the intention? if yes, happy to sign off.
Comment 6 Marc Véron 2016-01-11 08:35:14 UTC
(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.
Comment 7 Aleisha Amohia 2016-01-11 21:21:27 UTC Comment hidden (obsolete)
Comment 8 Aleisha Amohia 2016-01-11 21:25:14 UTC
(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 9 Jonathan Druart 2016-01-13 11:39:48 UTC
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.
Comment 10 Marc Véron 2016-01-13 14:48:51 UTC Comment hidden (obsolete)
Comment 11 Marc Véron 2016-01-13 14:49:57 UTC
This patch needs a new sing-off.
For new behaviour see new test plan (on patch).
Comment 12 Aleisha Amohia 2016-01-13 23:56:47 UTC Comment hidden (obsolete)
Comment 13 Kyle M Hall 2016-01-22 18:03:46 UTC
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>
Comment 14 Brendan Gallagher 2016-01-27 06:03:28 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!