[Koha-bugs] [Bug 12949] changing child to adult doesn't remove link to guarantor

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 28 21:09:49 CEST 2019


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

Nadine Pierre <nadine.pierre at InLibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #91057|0                           |1
        is obsolete|                            |

--- Comment #3 from Nadine Pierre <nadine.pierre at InLibro.com> ---
Created attachment 91121
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91121&action=edit
Bug 12949: Added syspref to control display of unlinked guarantor

When upgrading a child to adult patron the
guarantor details are still displayed on the new adult patrons record.

This is because upgrading a child to an adult patron involves clearing
the borrowers.guarantorid value but not the borrowers.contactname,
borrowers.contactfirstname

Bug 15928 introduced functionality to display contactname and
contactfirstname when no guarantorid exists. This was so unlinked guarantors
(non-librart patrons) could be set.

The display of guarantor information when the guarantorid has been
cleared following upgrading to an adult patron category is confusing, as it
appears that the guarantor relationship
already exists even though the child has been upgraded to an adult.

In this patch we introduce a sytem preference
GuarantorsMustBeLinkedToPatronAccount (enabled by default) - which
keeps the default Koha functionality introduced by 15928 when the
syspref is disabled - to only display gurantor information if a
guarantorid exists.

Test plan:
1. Create an adult patron (make sure to set a first and last name) and select
'Add child' and save the child
record

2. Run the following database query, and notice there are values for
guarantorid, contactname, contactfirstname:
SELECT guarantorid, contactname, contactfirstname FROM borrowers WHERE
borrowernumber=<childsborrowernumber>;

3. On the child record select More > Update child to adult patron.

4. Select a new adult patron category and save

5. Notice guarantor information is still displayed on the new adults
record

6. Repeat step 2 and notice guarantorid is empty/NULL and contactname
and contactfirstname are unchanged

7. Now create a child record with an unlinked guarantor: In the patron home
page select 'New patron'.

Note: Make sure the patron category you select is of category type 'Child'

8. In the guarantor area of the patron creation page input a firstname
and surname and don't select 'Set to patron' and save/submit the page

9. Repeat step 2 making the borrowernumber you enter the borrowernumber
of the patron you made in step 8 and notice guarantorid is empty and
contactname and contactfirstname are not empty. i.e. our guarantor is
not linked to a Koha patron

10. Notice guarantor information is shown on the patron summary page of
our user

11. Repeat step 3,4,5 and notice guarantor information is still
displayed

12. Apply patch

13. Navigate to installer/data/mysql directory

Enter the Koha shell:
sudo koha-shell <instancename>

Run:
./updatedatabase.pl

14. In staff client visit Administration > Global System preferences and
search for GuarantorsMustBeLinkedToPatronAccount syspref and confirm it
is enabled

15. Repeat steps 1-5 and notice that the guarantor information is not
displayed on the new adult's record

16. Repeat steps 7-10 and notice that the guarantor information is not
displayed on the new adult's record

17. Set GuarantorsMustBeLinkedToPatronAccount syspref to disabled

18. Repeat steps 1-5 and confirm the guarantor information is displayed
on the new adult's record (i.e. setting GuarantorsMustBeLinkedToPatronAccount
syspref to disabled keeps the current Koha behaviour)

19. Repeat steps 7-10 and confirm the guarantor information is displayed

20. Sign off

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Nadine Pierre <nadine.pierre at inLibro.com>

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


More information about the Koha-bugs mailing list