Bug 20363 - Privacy management shows misleading "No reading history to delete"
Summary: Privacy management shows misleading "No reading history to delete"
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 20429 (view as bug list)
Depends on: 16966
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-09 07:57 UTC by paxed
Modified: 2019-10-14 19:57 UTC (History)
4 users (show)

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


Attachments
Bug 20363: (bug 16966 follow-up) better messages handling (2.48 KB, patch)
2018-03-23 17:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20363: (bug 16966 follow-up) better messages handling (2.47 KB, patch)
2018-03-29 14:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20363: (bug 16966 follow-up) better messages handling (2.52 KB, patch)
2018-04-20 20:29 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 20363: (bug 16966 follow-up) better messages handling (2.59 KB, patch)
2018-04-21 08:01 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2018-03-09 07:57:58 UTC
(OPACPrivacy is on)

User views the "Your privacy" -page, it shows "No reading history to delete", even when the user has history. This is highly misleading.

Error caused by commit 286be46e8a8
Comment 1 Owen Leonard 2018-03-16 12:42:56 UTC
(In reply to paxed from comment #0)
> Error caused by commit 286be46e8a8

Bug 16966
Comment 2 Jonathan Druart 2018-03-23 17:02:47 UTC
Created attachment 73208 [details] [review]
Bug 20363: (bug 16966 follow-up) better messages handling

User views the "Your privacy" -page, it shows "No reading history to
delete", even when the user has history.

Test plan:
- Turn OPACPrivacy on
- Go to opac-privacy.pl
- Click the "Immediate deletion button" to delete the reading history
=> If the patron has reading history you must get "Your reading history has been deleted."
Otherwise "No reading history to delete"

Note that this patch reintroduce the "something went wrong" message if
the deletion failed for whatever reason.
Comment 3 Jonathan Druart 2018-03-23 17:03:44 UTC
*** Bug 20429 has been marked as a duplicate of this bug. ***
Comment 4 Mark Tompsett 2018-03-29 03:24:16 UTC
Comment on attachment 73208 [details] [review]
Bug 20363: (bug 16966 follow-up) better messages handling

Review of attachment 73208 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
@@ +27,4 @@
>  
>                      [% IF deleted %]
>                          <div class="alert alert-success">Your reading history has been deleted.</div>
> +                    [% ELSIF err_history_not_deleted %]

err_ does not match perl script's template_param.
Comment 5 Jonathan Druart 2018-03-29 14:49:54 UTC
Created attachment 73432 [details] [review]
Bug 20363: (bug 16966 follow-up) better messages handling

User views the "Your privacy" -page, it shows "No reading history to
delete", even when the user has history.

Test plan:
- Turn OPACPrivacy on
- Go to opac-privacy.pl
- Click the "Immediate deletion button" to delete the reading history
=> If the patron has reading history you must get "Your reading history has been deleted."
Otherwise "No reading history to delete"

Note that this patch reintroduce the "something went wrong" message if
the deletion failed for whatever reason.
Comment 6 David Bourgault 2018-04-20 20:29:43 UTC
Created attachment 74663 [details] [review]
Bug 20363: (bug 16966 follow-up) better messages handling

User views the "Your privacy" -page, it shows "No reading history to
delete", even when the user has history.

Test plan:
- Turn OPACPrivacy on
- Go to opac-privacy.pl
- Click the "Immediate deletion button" to delete the reading history
=> If the patron has reading history you must get "Your reading history has been deleted."
Otherwise "No reading history to delete"

Note that this patch reintroduce the "something went wrong" message if
the deletion failed for whatever reason.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Comment 7 Katrin Fischer 2018-04-21 08:01:48 UTC
Created attachment 74670 [details] [review]
Bug 20363: (bug 16966 follow-up) better messages handling

User views the "Your privacy" -page, it shows "No reading history to
delete", even when the user has history.

Test plan:
- Turn OPACPrivacy on
- Go to opac-privacy.pl
- Click the "Immediate deletion button" to delete the reading history
=> If the patron has reading history you must get "Your reading history has been deleted."
Otherwise "No reading history to delete"

Note that this patch reintroduce the "something went wrong" message if
the deletion failed for whatever reason.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Jonathan Druart 2018-04-23 17:29:27 UTC
Pushed to master for 18.05, thanks to everybody involved!