Bug 32195

Summary: Changing a patron category to disallow guarantors should remove existing guarantors
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, josefine.m.gustavsson, kyle.m.hall, patrick.robitaille, wizzyrea
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32196
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12446    
Bug Blocks:    

Description Andrew Fuerste-Henry 2022-11-14 16:47:14 UTC
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
Comment 1 Liz Rea 2023-10-27 14:39:19 UTC
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.