I am trying to wrap my mind around the table structure, but what happens is: If you add a tag, it will be in tags_all and tags_approval. tags_approval has a column approved_by, that is linked to the staff patron who moderated the tag. If the staff patron is deleted, the entry in tags_approval is also deleted, but tags_all remains. The tag vanishes from the tag moderation tool and from the OPAC. http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=installer/data/mysql/kohastructure.sql;hb=b4e843615a76d3a9a8516f82a2ebad96aa9c4d1a#l2268 This doesn't feel like intended behaviour. I think it maybe it would make sense to set the borrowernumber to NULL when the staff patron is deleted.
Unfortunately I have no solution to offer on this, however, I wanted to chime in and remark on how problematic this is for our library in the hope that it will spark some movement on this! We lost *hundreds* of tags when two staff member patron accounts were deleted, resulting in a labor-intensive project to identify the lost tags and to re-tag things. I would love to see a solution that preserves those tags after folks move on. Thank you!
Created attachment 46590 [details] [review] Bug 13534: Do not remove tags on deleting a patron On deleting a patron, all the tags approved by this user will be deleted. This can cause data lost. Test plan: 0/ Do not execute the update DB entry 1/ Create 2 patrons A, B 2/ Create some tags with patron A logged in 3/ Approve them with patron B logged in 4/ Delete the 2 patrons => The tags have been deleted 5/ Execute the DB entry 6/ Repeat 1,2,3,4 => The tags have not been deleted and are still shown on the interface (result, detail, tags module)
Increasing severity since it can cause data lost.
Created attachment 46630 [details] [review] Bug 13534: Do not remove tags on deleting a patron On deleting a patron, all the tags approved by this user will be deleted. This can cause data lost. Test plan: 0/ Do not execute the update DB entry 1/ Create 2 patrons A, B 2/ Create some tags with patron A logged in 3/ Approve them with patron B logged in 4/ Delete the 2 patrons => The tags have been deleted 5/ Execute the DB entry 6/ Repeat 1,2,3,4 => The tags have not been deleted and are still shown on the interface (result, detail, tags module) Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Created attachment 46713 [details] [review] Bug 13534: Do not remove tags on deleting a patron On deleting a patron, all the tags approved by this user will be deleted. This can cause data lost. Test plan: 0/ Do not execute the update DB entry 1/ Create 2 patrons A, B 2/ Create some tags with patron A logged in 3/ Approve them with patron B logged in 4/ Delete the 2 patrons => The tags have been deleted 5/ Execute the DB entry 6/ Repeat 1,2,3,4 => The tags have not been deleted and are still shown on the interface (result, detail, tags module) Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to Master - Should be in the May 2016 Release. Thanks!
Patches pushed to 3.22.x, will be in 3.22.4
This patch has been pushed to 3.20.x, will be in 3.20.9.