]> git.koha-community.org Git - koha.git/commit
Bug 23219: Cancel patrons holds when patron delete
authorEmmi <emmi.takkinen@outlook.com>
Tue, 2 Jul 2019 08:05:36 +0000 (11:05 +0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 15 Jul 2019 11:48:36 +0000 (12:48 +0100)
commit07af7b228f5513405e14281a9b082374c1c13519
treea6249ddd9b356888b758f594c818f23d2ec96b37
parentbb3a0e5dbc16b4249b3eacae98a26d3479a76f5a
Bug 23219: Cancel patrons holds when patron delete

Currently deleting a patron deletes all their holds and leaves
no record to the "old_reserves" table.

 Steps to reproduce:
- Create a patron
- Add holds for patron
- Holds are recorded to "reserves" table
- Delete patron
- Confirm delete
=>Patron and all holds are deleted and no record of holds is
left in "old_reserves" table

This patch displays alert text notifying user that deleting patron
cancels all their holds. Holds are cancelled instead of deleting them.
This patch also writes stringified datetime to holds cancel log instead
of whole datetime object.

To test:
- Apply this patch
- Create a patron
- Add holds for patron
- Holds are recorded to "reserves" table
- Delete patron
- Alert text of holds is displayed
- Confirm patron delete
=> Patron is deleted, their holds are cancelled and moved to
"old_reserves" table

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Hold.pm
Koha/Patron.pm
koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt
members/deletemem.pl