Koha-clms/members
Petro Vashchuk 9882869f1a Bug 25322: fix for not selected "relationship" defaults to father
When a user creates a patron's guarantor on /cgi-bin/koha/members/memberentry.pl but doesn't select the relationship from a dropdown, the relationship defaults to first value, which in default sysprefs is "father". This may or may not be correct as this is not a conscious choice from the user.

The solution is to make the "Relationship" field mandatory when there is no empty entry in the system preferences, always starting with an empty option but not allowing the user to save an empty entry.
And if there is an empty option in sysprefs, it allows to save empty, as well as makes it default choice.

To reproduce with default system preferences:
    1) Create a new patron who is assumed to have a guarantor or modify the existing one.
    2) Under "Guarantor Information" click on "Search to add" button. After performing the search, select a user to act as guarantor. Don't use the dropdown menu to select a relationship. Save your changes.
    3) Observe that relationship is set as "father".
    4) Apply the patch.
    5) Repeat steps 1 and 2.
    6) Observe that it doesn't allow you to save the form until you pick a relationship type.

To reproduce with empty entry added to system preferences:
    1) Add an empty entry to borrowerRelationship at /cgi-bin/koha/admin/preferences.pl?tab=patrons in Patron relationships section (example: "|father|mother").
    2) Create a new patron who is assumed to have a guarantor or modify the existing one.
    3) Under "Guarantor Information" click on "Search to add" button. After performing the search, select a user to act as guarantor. Don't use the dropdown menu to select a relationship. Save your changes.
    4) Observe that relationship is set as "father".
    5) Apply the patch.
    6) Repeat steps 1, 2 and 3.
    7) Observe when you save the empty entry it does set the relationship as empty.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 029f41a667)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2020-07-13 16:30:58 +00:00
..
accountline-details.pl Bug 20666: Correct executable permissions 2018-05-03 13:26:48 -03:00
apikeys.pl Bug 21993: Display a user-friendly message when the CSRF token is wrong 2019-01-25 20:38:32 +00:00
boraccount.pl Bug 23051: (follow-up) Add renewal feedback and move code to subroutines and test 2020-03-06 10:03:34 +00:00
default_messageprefs.pl Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers' 2018-02-12 15:41:37 -03:00
deletemem.pl Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes 2020-06-17 23:48:18 +00:00
discharge.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
discharges.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
files.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
guarantor_search.pl Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers' 2018-02-12 15:41:37 -03:00
holdshistory.pl Bug 21939: Fix permissions for holds history tab 2019-11-07 13:22:03 +00:00
housebound.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ill-requests.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
mancredit.pl Bug 17702: Add UI to manage account credit types 2020-02-20 14:46:33 +00:00
maninvoice.pl Bug 14898: Add button at manual invoice to redirect to pay tab 2020-02-20 09:04:27 +00:00
member-flags.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
member-password.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
member.pl Bug 20998: Simplify the conditional statement 2018-06-29 19:05:57 +00:00
memberentry.pl Bug 25322: fix for not selected "relationship" defaults to father 2020-07-13 16:30:58 +00:00
members-home.pl Bug 23697: (QA follow-up) Rename PatronAutocompletion to PatronAutoComplete 2019-10-08 14:51:12 +01:00
members-update-do.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
members-update.pl Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers' 2018-02-12 15:41:37 -03:00
merge-patrons.pl Bug 9302: Add error message if keeper patron is invalid 2018-04-20 13:34:41 -03:00
mod_debarment.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
moremember.pl Bug 20443: Use search_with_library_limits for attribute types 2020-03-23 13:49:22 +00:00
notices.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
patronimage.pl Bug 17423 - patronimage.pl permission is too restrictive 2016-10-17 23:44:25 +00:00
pay.pl Bug 23051: (follow-up) Add renewal feedback and move code to subroutines and test 2020-03-06 10:03:34 +00:00
paycollect.pl Bug 25526: Equality matching is case sensative 2020-06-17 21:24:52 +00:00
print_overdues.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
printfeercpt.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
printinvoice.pl Bug 21879: Code cleaning in printinvoice.pl 2020-02-26 20:42:56 +00:00
printslip.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
purchase-suggestions.pl Bug 22868: Move suggestions_manage subperm out of acquisition perm 2020-01-30 08:27:00 +00:00
readingrec.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
routing-lists.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
setstatus.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00
statistics.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
summary-print.pl Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
update-child.pl Bug 24018: Remove die "Not logged in" 2020-01-20 14:03:49 +00:00