Bug 30344 - Changing a patron from a category that allows guarantees to one that doesn't should remove that link
Summary: Changing a patron from a category that allows guarantees to one that doesn't ...
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 12446
Blocks: 30351
  Show dependency treegraph
 
Reported: 2022-03-23 18:18 UTC by Kyle M Hall (khall)
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 30344: Changing a patron from a category that allows guarantees to one that doesn't should remove that link (3.62 KB, patch)
2022-03-24 11:00 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 30344: Changing a patron from a category that allows guarantees to one that doesn't should remove that link (3.61 KB, patch)
2022-11-14 14:19 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2022-03-23 18:18:21 UTC
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.
Comment 1 Kyle M Hall (khall) 2022-03-23 19:05:47 UTC
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.
Comment 2 Kyle M Hall (khall) 2022-03-24 11:00:19 UTC
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
Comment 3 Andrew Fuerste-Henry 2022-07-29 16:14:58 UTC
Added a dependency on 12446, which just made it possible to have guarantors for adults. This patch no longer applies.
Comment 4 Kyle M Hall (khall) 2022-11-14 14:19:21 UTC
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
Comment 5 Andrew Fuerste-Henry 2022-11-14 16:35:17 UTC
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.
Comment 6 Andrew Fuerste-Henry 2022-11-14 16:50:36 UTC
That said, please see bug 32195 and bug 32196 for issues where a patron category is edited and leaves un-editable relationships.