With the ability to have adults guarantee for adults, I believe the above might no longer be true. Found while translating in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:190
This error is triggered when patron added as guarantor is a child OR has categorycode which has setting "can_be_guarantee" on. So it's still valid.
I am pretty sure I have recently build a "chained" construct with 3 patrons guaranteeing for each other when testing another bug. That's why I am confused. Bug 32980 - Checkouts for guarantees are not shown if patron also has a guarantor We need to come to a conclusion how these things are supposed to work.
(In reply to Katrin Fischer from comment #2) > I am pretty sure I have recently build a "chained" construct with 3 patrons > guaranteeing for each other when testing another bug. That's why I am > confused. > > Bug 32980 - Checkouts for guarantees are not shown if patron also has a > guarantor > > We need to come to a conclusion how these things are supposed to work. Hmm, could you describe what you did a bit more? And did you have syspref "ChildNeedsGuarantor" enabled when doing this?
As a side note, I realized that we don't really need to check if patron is child when "ChildNeedsGuarantor" is enabled. It's enough to check if patrons category has "Can be guarantee" set. Secondly, I'm now second guessing this line: if ( ( $op eq 'save' || $op eq 'insert' ) && $guarantor->is_child || $guarantor->category->can_be_guarantee ) { push @errors, 'ERROR_guarantor_is_guarantee'; } In this too, we could get rid of $guarantor->is_child. And yeah, I can see where the confusion comes. This doesn't prevent all situations where of someone being both guarantee and guarantor. They can be also guarantor as long as their category type doesn't have "Can be guarantee" set. And "ChildNeedsGuarantor" and error "Child patron needs guarantor." have to be changed. Actually, I'm not sure anymore if "ChildNeedsGuarantor" should be a global syspref. Instead it should be category specific like "Can be guarantee" (something like "Guarantor is mandatory"). It would be more flexible.
Button "+ add guarantee" appears when patron.is_adult meaning in category type A or I. This must depend on patron category having not "Can be guarantee" right ?
(In reply to Fridolin Somers from comment #5) > Button "+ add guarantee" appears when patron.is_adult > meaning in category type A or I. > > This must depend on patron category having not "Can be guarantee" right ? I think you are right.
There’s another bug related to patrons in the same category not being able to be guarantor and guarantee. Maybe it would be worth waiting for that fix before making any decisions. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37892