Koha How-To

Ability to Add Multiple Guarantors

Multiple Guarantors

A new feature is coming in 19.11 to allow for libraries to have multiple guarantors to a patron record. Prior to 19.11, a child account could only have one guarantor. This includes the ability to have existing Koha patrons and also a guarantor that does not exist in Koha. This feature was sponsored by Northeast Kansas Library System and Vermont Organization of Koha Automated Libraries.

Steps

To add multiple guarantor accounts to a patron:

If a guarantee account already has a guarantor account connected, to add another guarantor will require staff to edit the guarantee’s account and add another guarantor.

When adding a patron already within the library’s system, enter the patron name in the search and select from the list of names.

Once the guarantor has been selected, a relationship can be chosen from the relationship dropdown. After the account has been saved, from the details page of the guarantee, the multiple guarantors can be viewed and are linkable.

If a new guarantee account is being created, the ability to add multiple guarantors at this time also exists. Once one guarantor has been added, the staff can add another guarantor during this same period.

There are two newly named fields in the patron account form to allow for libraries to retain names of guarantors that are not in the Koha system.

Under the contact portion of the patron form, there are fields called: guarantor surname, guarantor first name and also the ability to choose the relationship of this guarantor. At this time, these guarantor names are not visible from the patron detail page, however, this bug [24666] has been patched and will be applied to a future version of 19.11.

This relationship dropdown generates the choices from the system preference, borrowerRelationship, a library can certainly add or remove some options if they choose to do so.

Report Change

With this new feature, the guarantor/guarantee relationship has been removed from their previous table and a new table has been created. Any reports that utilized the borrowers.guarantorid will now need to be updated.

An example report (pre 19.11) using borrower.guarantorid:

SELECT IFNULL(concat(g.surname, ', ', g.firstname, ' (',g.cardnumber, ')'),'') AS guarantor, IFNULL(concat(p.surname, ', ', p.firstname, ' (',p.cardnumber, ')'),'') AS guarantee

FROM( SELECT * FROM borrowers

WHERE guarantorid IS NOT NULL) AS p

LEFT JOIN borrowers AS g ON p.guarantorid = g.borrowernumber

ORDER BY g.borrowernumber

A revised report with using the new table:

SELECT IFNULL(concat(e.surname, ', ', e.firstname, ' (',e.cardnumber, ')'),'') AS Guarantee,IFNULL(concat(r.surname, ', ', r.firstname, ' (',r.cardnumber, ')'),'') AS Guarantor, borrower_relationships.relationship

FROM borrower_relationships
LEFT JOIN borrowers e ON borrower_relationships.guarantee_id=e.borrowernumber
LEFT JOIN borrowers r ON borrower_relationships.guarantor_id=r.borrowernumber

ORDER by guarantee_id

Rest API

This feature does retain the existing behavior for importing guarantors during patron imports, however, patron guarantors can not be viewed, added, updated via the REST API.