Bug 31890

Summary: PrefillGuaranteeField should include option to prefill surname
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: PatronsAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, kyle.m.hall, kyle, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
This bugfix adds the surname field to the list of fields (in the PrefillGuaranteeField system preference) that can be automatically prefilled when adding a guarantee to a patron's account.
Version(s) released in:
23.05.00,22.11.04
Circulation function:
Attachments: Bug 31890: Add surname to PrefillGuaranteeField system pref
Bug 31890: Add surname to PrefillGuaranteeField system pref
Bug 31890: Add surname to PrefillGuaranteeField system pref

Description Lucas Gass (lukeg) 2022-10-20 14:47:57 UTC
The PrefillGuaranteeField system preference does not allow for the copying of the surname field, I think it should.
Comment 1 Lucas Gass (lukeg) 2022-12-19 20:44:44 UTC Comment hidden (obsolete)
Comment 2 David Nind 2022-12-20 00:57:53 UTC
Created attachment 144728 [details] [review]
Bug 31890: Add surname to PrefillGuaranteeField system pref

To test:
1. Apply patch and restart_all
2. Find the system preference PrefillGuaranteeField
3. Look for the Surname option and add it
4. Go to a patron account and add a gaurantee
5. See that the surname is properly populated for the gaurantor's surname field

Note:
This patch replaces borrower_data.surname with patron.surname. There seems to be a mismatch here so I filed Bug 32458.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-12-20 01:05:21 UTC
Testing notes (using KTD):

1. Step 4: Showing my lack of knowledge (for whatever reason, I originally couldn't work out how to do this!) - to add a guarantee to a patron:
   1.1 Go to a patron's account (such as Mary Burton)
   1.2 Click the '+ Add guarantee' option after the 'Edit' option
Comment 4 Kyle M Hall (khall) 2023-02-10 19:11:11 UTC
Created attachment 146511 [details] [review]
Bug 31890: Add surname to PrefillGuaranteeField system pref

To test:
1. Apply patch and restart_all
2. Find the system preference PrefillGuaranteeField
3. Look for the Surname option and add it
4. Go to a patron account and add a gaurantee
5. See that the surname is properly populated for the gaurantor's surname field

Note:
This patch replaces borrower_data.surname with patron.surname. There seems to be a mismatch here so I filed Bug 32458.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi (tcohen) 2023-02-20 12:44:56 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Martin Renvoize (ashimema) 2023-02-24 08:31:33 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 7 Lucas Gass (lukeg) 2023-03-01 14:38:49 UTC
Enhancement will not be backported to 22.05.x