Summary: | Add ability to choose which fields are copied from guarantor to guarantee | ||
---|---|---|---|
Product: | Koha | Reporter: | Genevieve Beaudry <genevieve.beaudry> |
Component: | Patrons | Assignee: | Alex Buckley <alexbuckley> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | 1joynelson, alexbuckley, caroline.cyr-la-rose, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, martin.renvoize, sally.healey |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23808 | ||
Change sponsored?: | Sponsored | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement allows administrators to configure which fields from the guarantor's patron record will be copied to the guarantees record when the link between the accounts is created.
**New system preference**: `PrefillGuaranteeField` defaults to `phone,email,streetnumber,address,city,state,zipcode,country`.
|
Version(s) released in: |
20.05.00
|
Circulation function: | |||
Bug Depends on: | 23808 | ||
Bug Blocks: | 29576 | ||
Attachments: |
Bug 22534: Added syspref for defining what guarantee fields are pre filled
Bug 22534: Added syspref for defining what guarantee fields are pre filled Bug 22534: Added syspref for defining what guarantee fields are pre filled Bug 22534: Added syspref for defining what guarantee fields are pre filled Bug 22534: Added syspref for defining what guarantee fields are pre filled Bug 22534: Added syspref for defining what guarantee fields are pre filled Bug 22534: (RM follow-up) Remove errant hidden file |
Description
Genevieve Beaudry
2019-03-18 20:17:22 UTC
Oops, I reported this. I just forgot to log out of Geneviève's bz account first. Sorry! Hi Caroline, This sounds like a really great enhancement. I'd love to work on this. Thanks, Alex *** Bug 24942 has been marked as a duplicate of this bug. *** Created attachment 101499 [details] [review] 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 is empty 8. Repeat step 1 and observe none of the fields in 'Main address' , 'Contact' or 'Alternate address' are prefilled from guarantor 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 Hi all, Patch finished. Please test when you are able to and let me know what you think :) Cheers, Alex Created attachment 101501 [details] [review] 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 Sorry I had missed in my test plan that the new PrefillGuaranteeField syspref has the default value of phone|email|streetnumber|address|city|state|zipcode|country Which was suggested as defaults in the description of this bug report. All ready to test :) Created attachment 101563 [details] [review] 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 Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> I've tested 1-15 on a sandbox and it works well. If someone else could test 16, then I'm happy to add my sign off line to the patch: 16. Run tests: sudo koha-shell <instancename> prove xt prove t (In reply to Sally from comment #9) > I've tested 1-15 on a sandbox and it works well. > > If someone else could test 16, then I'm happy to add my sign off line to the > patch: > > 16. Run tests: > sudo koha-shell <instancename> > prove xt > prove t Hi Sally, don't worry about those, we will cover tests during QA :) Ah brilliant, thanks for letting me know, Katrin! :) I've updated the status to Signed Off. Alex, I do not understand the test plan, why do you suggest having both altcontactphone and phone in the pref? You should use the multiple options, like for CollapseFieldsPatronAddForm. Hi Jonathan, Thanks for your question/suggestion. I added both altcontactphone and phone simply to illustrate that all fields (in Main address, contact, alternate address, and alternate contact) could be filled. So if a librarian wanted the main phone field to be filled from guarantor record they could but they could equally choose to fill altcontactphone instead - both of those fields will be filled if entered into the syspref. I'll make the changes you mentioned now Thanks, Alex Hi all, I've amended my patch. I realised I was incorrectly assigning guatantors main address and guarantor contact fields directly into guarantee alternate address and alternate contact. In my new patch the pre-filling mapping is: guarantor:main address = guarantee:main address guarantor:contact = guarantee:contact guarantor:Alternate address = guarantee:Alternate address guarantor:Alternate contact = guarantee:Alternate contact I've also changed the syspref to be 'multiple' like you requested Jonathan. I've listed individual fields (ordered alphabetically based on the displayed text) in the PrefillGuaranteeField rather than sections of the member entry form like in CollapseFieldsPatronAddForm this is to give librarians more granulated control if they want to pre-fill some but not all fields in 'contact' section of member entry form for example. As I have changed the syspref quite significantly I'll need to obsolete the patch on this ticket already tested otherwise I'd have to make another atomicupdate to UPDATE the syspref. Could you please re-test Sally (or anyone else interested to do so)? Many thanks, Alex Created attachment 102097 [details] [review] Bug 22534: Added syspref for defining what guarantee fields are pre filled Librarians should be able to define what sections in member entryfields 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'), 'Alternate address', and 'Alternate contact') 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 * Fields in 'Alternate address' (except for Contact note) are 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. Restart plack: sudo koha-plack --restart <instancename> 7. Go to Administration > Global system preferences and search for the new PrefillGuaranteeField system preference 8. Observe this syspref contains checkboxes and the following are selected by default: Contact - Primary email Contact - Primary phone Main address - Address Main address - City Main address - Country Main address - State Main address - ZIP/Postal code Main address - street number Please note: 'Contact - Guarantor surname', 'Contact - Guarantor first name', Contact - relationship' are not in PrefillGuaranteeField syspref as they are for non Koha patrons and so should not be pre-filled from a Koha patron. 9. Repeat step 1 and observe the following fields are prefilled from guarantor: In Main address section - streetnumber address city state zipcode/postal code country In Contact section - Primary phone Primary email 10. In the PrefillGuaranteeField syspref click '[Select all]' checkboxes 11. Repeat step 1 and observe all fields in 'Main address', 'Contact' (except Guarantor surname, Guarantor first name, and relationship), Alternate address and Alterate contact are filled from guarantor record. i.e. The values in guarantor's 'Alternate address' fields fill the guarantee's 'Alternate address' fields 12. Change a few of the prefilled field values and 'Save' and observe your changes have been saved in addition to the unaltered pre-filled values in other fields 13. Amend PrefillGuarantee field syspref to have no checkboxes selected 14. Repeat step 1 and observe none of the fields in Main address, Contact, Alternate address and Alternate contact are pre-filled 15. Run tests: sudo koha-shell <instancename> prove xt prove t Sponsored-by: Waitaki Distict Council, NZ Created attachment 102124 [details] [review] Bug 22534: Added syspref for defining what guarantee fields are pre filled Librarians should be able to define what sections in member entryfields 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'), 'Alternate address', and 'Alternate contact') 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 * Fields in 'Alternate address' (except for Contact note) are 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. Restart plack: sudo koha-plack --restart <instancename> 7. Go to Administration > Global system preferences and search for the new PrefillGuaranteeField system preference 8. Observe this syspref contains checkboxes and the following are selected by default: Contact - Primary email Contact - Primary phone Main address - Address Main address - City Main address - Country Main address - State Main address - ZIP/Postal code Main address - street number Please note: 'Contact - Guarantor surname', 'Contact - Guarantor first name', Contact - relationship' are not in PrefillGuaranteeField syspref as they are for non Koha patrons and so should not be pre-filled from a Koha patron. 9. Repeat step 1 and observe the following fields are prefilled from guarantor: In Main address section - streetnumber address city state zipcode/postal code country In Contact section - Primary phone Primary email 10. In the PrefillGuaranteeField syspref click '[Select all]' checkboxes 11. Repeat step 1 and observe all fields in 'Main address', 'Contact' (except Guarantor surname, Guarantor first name, and relationship), Alternate address and Alterate contact are filled from guarantor record. i.e. The values in guarantor's 'Alternate address' fields fill the guarantee's 'Alternate address' fields 12. Change a few of the prefilled field values and 'Save' and observe your changes have been saved in addition to the unaltered pre-filled values in other fields 13. Amend PrefillGuarantee field syspref to have no checkboxes selected 14. Repeat step 1 and observe none of the fields in Main address, Contact, Alternate address and Alternate contact are pre-filled 15. Run tests: sudo koha-shell <instancename> prove xt prove t Sponsored-by: Waitaki Distict Council, NZ Signed-off-by: Sally <sally.healey@cheshiresharedservices.go.uk> Created attachment 102126 [details] [review] Bug 22534: Added syspref for defining what guarantee fields are pre filled Librarians should be able to define what sections in member entryfields 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'), 'Alternate address', and 'Alternate contact') 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 * Fields in 'Alternate address' (except for Contact note) are 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. Restart plack: sudo koha-plack --restart <instancename> 7. Go to Administration > Global system preferences and search for the new PrefillGuaranteeField system preference 8. Observe this syspref contains checkboxes and the following are selected by default: Contact - Primary email Contact - Primary phone Main address - Address Main address - City Main address - Country Main address - State Main address - ZIP/Postal code Main address - street number Please note: 'Contact - Guarantor surname', 'Contact - Guarantor first name', Contact - relationship' are not in PrefillGuaranteeField syspref as they are for non Koha patrons and so should not be pre-filled from a Koha patron. 9. Repeat step 1 and observe the following fields are prefilled from guarantor: In Main address section - streetnumber address city state zipcode/postal code country In Contact section - Primary phone Primary email 10. In the PrefillGuaranteeField syspref click '[Select all]' checkboxes 11. Repeat step 1 and observe all fields in 'Main address', 'Contact' (except Guarantor surname, Guarantor first name, and relationship), Alternate address and Alterate contact are filled from guarantor record. i.e. The values in guarantor's 'Alternate address' fields fill the guarantee's 'Alternate address' fields 12. Change a few of the prefilled field values and 'Save' and observe your changes have been saved in addition to the unaltered pre-filled values in other fields 13. Amend PrefillGuarantee field syspref to have no checkboxes selected 14. Repeat step 1 and observe none of the fields in Main address, Contact, Alternate address and Alternate contact are pre-filled 15. Run tests: sudo koha-shell <instancename> prove xt prove t Sponsored-by: Waitaki Distict Council, NZ Signed-off-by: Sally <sally.healey@cheshiresharedservices.go.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 Many thanks everyone! Created attachment 102919 [details] [review] Bug 22534: (RM follow-up) Remove errant hidden file An nfs share file got commited by mistake :( Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> enhancement not backported to 19.11.x |