Bug 10910 - Add a warn when deleting a patron with pending suggestions
Summary: Add a warn when deleting a patron with pending suggestions
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-18 12:30 UTC by mathieu saby
Modified: 2020-11-16 14:09 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
A warning is displayed if a staff member is trying to delete a patron with pending suggestions.
Version(s) released in:
20.11.00, 20.05.01


Attachments
Bug 10910: Add a warning when deleting a patron with pending suggestions (2.33 KB, patch)
2019-05-05 14:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10910: Add a warning when deleting a patron with pending suggestions (2.52 KB, patch)
2020-04-29 08:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10910: Add a warning when deleting a patron with pending suggestions (2.58 KB, patch)
2020-05-01 13:55 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 10910: Add a warning when deleting a patron with pending suggestions (2.65 KB, patch)
2020-05-01 16:30 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes (3.68 KB, patch)
2020-05-01 16:30 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10910: Add a warning when deleting a patron with pending suggestions (2.64 KB, patch)
2020-05-03 21:57 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes (3.72 KB, patch)
2020-05-03 21:57 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 10910: Add a warning when deleting a patron with pending suggestions (2.71 KB, patch)
2020-06-11 12:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes (3.80 KB, patch)
2020-06-11 12:56 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 mathieu saby 2013-09-18 12:30:42 UTC
You can delete a patron who has made suggestions without any warn.

We should have a specific warn, especially if all suggestions are not yet available (deleting the patron will make impossible to send him an email when the book arrive).

M. Saby
Comment 1 j.kylmala 2015-08-21 08:41:01 UTC
There comes the alert: "Are you sure you want to delete this patron? This cannot be undone." We could change it to something like: "Are you sure you want to delete this patron? All patron's details will be deleted including suggestions, blablabla. This cannot be undone."

What would be a good alert text there?
Comment 2 Katrin Fischer 2015-08-23 19:38:40 UTC
Hm, I think maybe keep the suggestions, but just set the borrowernumber to 0 or 'anonymous' if that isn't the case yet?
Comment 3 j.kylmala 2015-08-24 10:49:03 UTC
(In reply to Katrin Fischer from comment #2)
> Hm, I think maybe keep the suggestions, but just set the borrowernumber to 0
> or 'anonymous' if that isn't the case yet?

I could guess the suggestions are kept already (I hope so).

But If we delete a patron I think we cannot just delete the references to that Patron object, and leave all the data still in the system. If we want to keep some info like email address then we need to transfer it to the suggestion object.

However, I don't see this as an important feature to implement (to keep the email address). In my opinion the warning message is enough.
Comment 4 Katrin Fischer 2019-05-04 21:54:02 UTC
I think having a warning about suggestions would be nice, but should not block deleting. Also, we should not send them an email after deleting - if the patron 'revokes' the library's right to process/store their data, it might not be well received to email them after deletion...
Comment 5 Jonathan Druart 2019-05-05 14:43:25 UTC
Created attachment 89360 [details] [review]
Bug 10910: Add a warning when deleting a patron with pending suggestions
Comment 6 Jonathan Druart 2019-05-05 14:44:08 UTC
(In reply to Jonathan Druart from comment #5)
> Created attachment 89360 [details] [review] [review]
> Bug 10910: Add a warning when deleting a patron with pending suggestions

Something like that? Should we also add a warning in the batch deletion tool?
Comment 7 Katrin Fischer 2020-04-29 06:00:53 UTC
(In reply to Jonathan Druart from comment #6)
> (In reply to Jonathan Druart from comment #5)
> > Created attachment 89360 [details] [review] [review] [review]
> > Bug 10910: Add a warning when deleting a patron with pending suggestions
> 
> Something like that? Should we also add a warning in the batch deletion tool?

Yes, I think your patch looks good. I think having it on batch delete would be nice too, but could be handled in a separate bug.
Comment 8 Jonathan Druart 2020-04-29 08:33:54 UTC
Created attachment 103903 [details] [review]
Bug 10910: Add a warning when deleting a patron with pending suggestions

Test plan:
From the OPAC, add a suggestion
From the staff interface, try to delete the patron who created the
suggestion
=> You get a warning message
Comment 9 Victor Grousset/tuxayo 2020-05-01 13:55:45 UTC
Created attachment 104094 [details] [review]
Bug 10910: Add a warning when deleting a patron with pending suggestions

Test plan:
From the OPAC, add a suggestion
From the staff interface, try to delete the patron who created the
suggestion
=> You get a warning message

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 10 Katrin Fischer 2020-05-01 16:30:15 UTC
Created attachment 104128 [details] [review]
Bug 10910: Add a warning when deleting a patron with pending suggestions

Test plan:
From the OPAC, add a suggestion
From the staff interface, try to delete the patron who created the
suggestion
=> You get a warning message

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2020-05-01 16:30:20 UTC
Created attachment 104129 [details] [review]
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes

To test:
- Add a credit to the patron's account
- Make sure they got a pending suggestion
- Try to delete
- Verify you notes for both as list items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2020-05-01 16:31:23 UTC
Joubu or Victor - I moved things around a bit as we already have notes for existing holds and an open credit. Could you have another look?
Comment 13 Victor Grousset/tuxayo 2020-05-03 21:57:38 UTC
Created attachment 104237 [details] [review]
Bug 10910: Add a warning when deleting a patron with pending suggestions

Test plan:
From the OPAC, add a suggestion
From the staff interface, try to delete the patron who created the
suggestion
=> You get a warning message

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Victor Grousset/tuxayo 2020-05-03 21:57:42 UTC
Created attachment 104238 [details] [review]
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes

To test:
- Add a credit to the patron's account
- Make sure they got a pending suggestion
- Try to delete
- Verify you notes for both as list items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 15 Victor Grousset/tuxayo 2020-05-03 21:57:57 UTC
Before:
https://picat.drycat.fr/VIBbTcie.png

After:
https://picat.drycat.fr/BRfUuGCH.png

Thanks cait! :)
Comment 16 Katrin Fischer 2020-06-11 12:55:56 UTC
Created attachment 105752 [details] [review]
Bug 10910: Add a warning when deleting a patron with pending suggestions

Test plan:
From the OPAC, add a suggestion
From the staff interface, try to delete the patron who created the
suggestion
=> You get a warning message

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2020-06-11 12:56:00 UTC
Created attachment 105753 [details] [review]
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes

To test:
- Add a credit to the patron's account
- Make sure they got a pending suggestion
- Try to delete
- Verify you notes for both as list items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Jonathan Druart 2020-06-15 09:58:57 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 19 Lucas Gass 2020-06-17 23:50:07 UTC
backported to 20.05.x for 20.05.01
Comment 20 Aleisha Amohia 2020-06-22 04:43:37 UTC
enhancement, not backported to 19.11.x