[Koha-bugs] [Bug 35421] Is "A guarantor cannot be a guarantee." still correct?

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 29 13:43:43 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35421

--- Comment #4 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list