Bug 20363

Summary: Privacy management shows misleading "No reading history to delete"
Product: Koha Reporter: paxed <pasi.kallinen>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: david.bourgault, josef.moravec, lucas, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20429
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 16966    
Bug Blocks:    
Attachments: Bug 20363: (bug 16966 follow-up) better messages handling
Bug 20363: (bug 16966 follow-up) better messages handling
Bug 20363: (bug 16966 follow-up) better messages handling
Bug 20363: (bug 16966 follow-up) better messages handling

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!