If a child typo patron is changed to an adult type patron, it hides the patron's guarantors, but does not remove that link. We should be removing that link.
Updated description: If an adult type patron is changed to a child type patron, it hides the patron's guarantees, but does not remove that link. We should be removing that link as we do when a guarantee becomes an adult type patron.
Created attachment 132117 [details] [review] Bug 30344: Changing a patron from a category that allows guarantees to one that doesn't should remove that link If an adult type patron is changed to a child type patron, it hides the patron's guarantees, but does not remove that link. We should be removing that link as we do when a guarantee becomes an adult type patron. Test Plan: 1) Create an adult with a guarantor 2) Turn that adult into a child patron tyupe 3) Note the guarantees show on the patron details, but not in the patron editor 4) Turn that patron back into an adult 5) Note the guarantees how again in the editor 6) Apply this patch 7) Restart all the things! 8) Turn that patron back into a child again 9) Note the guarantees no longer show on the patron details 10) Turn that patron back into an adult 11) Note the patron still has no guarantees
Added a dependency on 12446, which just made it possible to have guarantors for adults. This patch no longer applies.
Created attachment 143829 [details] [review] Bug 30344: Changing a patron from a category that allows guarantees to one that doesn't should remove that link If an adult type patron is changed to a child type patron, it hides the patron's guarantees, but does not remove that link. We should be removing that link as we do when a guarantee becomes an adult type patron. Test Plan: 1) Create an adult with a guarantor 2) Turn that adult into a child patron tyupe 3) Note the guarantees show on the patron details, but not in the patron editor 4) Turn that patron back into an adult 5) Note the guarantees how again in the editor 6) Apply this patch 7) Restart all the things! 8) Turn that patron back into a child again 9) Note the guarantees no longer show on the patron details 10) Turn that patron back into an adult 11) Note the patron still has no guarantees
I can no longer reproduce the original issue on master without these patches. Here's what I get before I apply any of this: 1: create a patron in a category where canbeguarantee=1 2: give that patron a guarantor, confirm it shows in details and editor 3: edit that patron to a category where canbeguarantee=0 4: confirm on details and in editor that patron's guarantor no longer shows 5: edit patron back to their original category 6: confirm their guarantor *still* doesn't show So I'm marking this resolved, Works for Me, but please adjust if you can reproduce the issue.
That said, please see bug 32195 and bug 32196 for issues where a patron category is edited and leaves un-editable relationships.