Koha-clms/Koha/Patron
Petro Vashchuk 0cd7a8cedb Bug 25946: borrowerRelationship can be empty
When borrowerRelationship is empty in system preferences, Relationship
dropdown is not required and we accept empty value.

Also fixes bug that didn't let you to pick empty value even when you
specified that it should be possible in system preferences but in the
end of the string (i.e. "|father|mother" worked,
but "father|mother|" don't).

To reproduce (borrowerRelationship can be empty):
    1) Go to system preferences and make borrowerRelationship empty.
    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. Try to save your changes.
    4) Observe that relationship field is required in order to save but
    you can't actually choose anything as it doesn't contain anything.
    5) Apply the patch.
    6) Repeat steps above.
    7) Observe that it allows you to save the form now.

To reproduce (can't choose empty value bug):
    1) Go to system preferences and set borrowerRelationship exactly
    to "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.
    4) Observe that there's no option to leave relationship field empty.
    5) Apply the patch.
    6) Repeat steps above.
    7) Observe that it has empty option that you can choose and save
    the form.

Mentored-by: Andrew Nugged <nugged@gmail.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d0cc5fa97a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-04-07 11:42:20 +02:00
..
Attribute Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Password Bug 27860: Fix password recovery 2021-03-19 16:14:33 +01:00
Attribute.pm Bug 20443: Do not explode if attribute does not have a valid av 2020-03-23 13:49:23 +00:00
Attributes.pm Bug 20443: Fix merge_with behavior 2020-03-23 13:49:24 +00:00
Categories.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Category.pm Bug 23816: trivial code simplification 2020-09-09 15:39:52 +02:00
Consent.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Consents.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Debarments.pm Bug 26594: (QA follow-up) Make _UpdateBorrowerDebarmentFlags a public method 2020-11-10 15:00:14 +01:00
Discharge.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Files.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
HouseboundProfile.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundProfiles.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundRole.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundRoles.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundVisit.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
HouseboundVisits.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Image.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Images.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Message.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Messages.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Modification.pm Bug 20443: Fix patron modification approval 2020-03-23 13:49:23 +00:00
Modifications.pm Bug 20443: Fix patron modification approval 2020-03-23 13:49:23 +00:00
Relationship.pm Bug 25946: borrowerRelationship can be empty 2021-04-07 11:42:20 +02:00
Relationships.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00