To recreate: 1: have a patron category where CanBeGuarantee is set to Yes. 2: Create a patron in that category, give them a guarantor 3: edit the patron category to set CanBeGuarantee to No 4: confirm your patron still has a guarantor that shows on the details page, but the guarantor no longer shows on the edit screen 5: this means the guarantor cannot be removed :( I see a few ways to move forward. We could: - make Koha go find and remove relationships right away when a category is updated - provide a script that could be run/cronned to find and delete relationships from the command line
I think we just need to always show the "remove" link no matter what the category says - if there is a guarantor we at least need to be able to remove it. The main problem here being that we are editing the category underneath an existing patron and the settings aren't retroactive to patrons who now don't fit the defined category.
I agree with Liz. Having it set to always show "remove" would be best.
I'm renaming and re-focusing this bug to specifically a flag on the update_patrons_category script to automatically remove guarantors when a patron moves into a category that does not allow guarantors. Bug 32196 suggests that the staff interface always show and allow removal of a guarantor if one exists, regardless of patron category. That would handle the manual side of this issue.