[Koha-bugs] [Bug 22534] Add ability to choose which fields are copied from guarantor to guarantee

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 24 04:38:35 CET 2020


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

--- Comment #6 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 101501
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101501&action=edit
Bug 22534: Added syspref for defining what guarantee fields are pre filled

Librarians should be able to define what fields in 'Main address',
'Contact' and 'Alternate contact' in member entry form for guarantee's are
pre-filled from guarantor's record

The 'Guarantor surname, 'Guarantor first name' and 'relationship' fields
in the 'Contact' section should not be filled from guarantor patron
record as those fields are intended for guarantor's without patron
records in Koha.

Test plan:
1. On an adult patron's record (which has all fields filled out in the
'Main address', 'Contact' (Except for 'Guarantor surname', 'Guarantor
first name', and 'relationship')) select 'Add guarantee'

2. Observe:

* Fields in 'Main address' are all automatically pre-filled
from guarantor record

* Fields in 'Contact' (except 'Guarantor surname', 'Guarantor firstname'
and 'relationship') are all automatically pre-filled from guarantor
record

* None of the fields in 'Alternate contact' are pre-filled
from guarantor

4. Apply patch

5. Run database updates
cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl

6. Go to Administration > Global system preferences and search for the
new PrefillGuaranteeField system preference

7. Observe this syspref containing the following:
phone|email|streetnumber|address|city|state|zipcode|country

8. Repeat step 1 and observe the following fields are prefilled from guarantor:
streetnumber
address
city
state
zipcode/postal code
country
Primary phone
Primary email

9. Add the following content into PrefillGuaranteeField syspref and save:
phone|phonepro|mobile|email|emailpro|fax|streetnumber|address|address2|city|state|zipcode|country|altcontactfirstname|altcontactsurname|altcontactaddress1|altcontactaddress2|altcontactaddress3|altcontactstate|altcontactzipcode|altcontactcountry|altcontactphone

10. Repeat step 1 and observe all fields in 'Main address',
'Alternate contact', and (except 'Guarantor surname', 'Guarantor
first name', and 'relationship') in 'Contact' are pre-filled from
guarantor

11. Change a few of the prefilled field values and 'Save' and observe your
changes
have been saved as have the values you haven't altered

12. Amend PrefillGuaranteeField syspref to be:
phone|phonepro|mobile|email|emailpro|fax|streetnumber|address|address2|city|state|zipcode|country|altcontactfirstname|altcontactsurname|drfregfre|altcontactaddress1|altcontactaddress2|altcontactaddress3|altcontactstate|altcontactzipcode|altcontactcountry|altcontactphone

(Note: Have added a invalid column field 'drfregfre')

13. Repeat step 1 and observe no internal server errors and all fields
listed in step 10 are still pre-filled

14. Amend PrefillGuarantee field syspref to be:
phone|phonepro|mobile|email|contactfirstname|emailpro|fax|streetnumber|address|address2|city|state|zipcode|country|altcontactfirstname|altcontactsurname|altcontactaddress1|altcontactaddress2|altcontactaddress3|altcontactstate|altcontactzipcode|altcontactcountry|altcontactphone

(Note: Have added contactfirstname which is what the 'Guarantor first
 name' field in 'Contact' section of member entry form is)

15. Repeat step 1 and observe all fields defined in step 10 are filled
and 'Guarantor first name' is not filled even though it was listed in
PrefillGuarantorField because contactfirstname (along with
contactsurname and relationship are meant for non Koha patrons and so
should not pre-fill from a Koha patron)

16. Run tests:
sudo koha-shell <instancename>
prove xt
prove t

Sponsored-by: Waitaki Distict Council, NZ

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


More information about the Koha-bugs mailing list