Main Koha release repository https://koha-community.org
Find a file
Petro Vashchuk 029f41a667 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>
2020-06-29 12:37:02 +02:00
acqui Bug 25611: Use selected vendor when creating a basket 2020-06-24 14:31:37 +02:00
admin Bug 24156: Fix set sort order to the first column 2020-06-25 10:51:59 +02:00
api/v1 Bug 25288: Add general query parameters to the /libraries route 2020-06-24 15:15:41 +02:00
authorities Bug 25428: Correctly encode link if authority subfield is a URL 2020-05-22 09:33:16 +01:00
basket Bug 17842: Simplify the code 2020-06-12 10:32:35 +02:00
C4 Bug 25875: Move check for module_bit and code to the JOIN 2020-06-29 12:37:01 +02:00
catalogue
cataloguing Bug 25553: Make date columns sortable on the edit items table 2020-06-24 14:23:23 +02:00
circ Bug 25699: Add edition information to "Holds to pull" report 2020-06-24 14:31:37 +02:00
clubs
course_reserves Bug 22970: Allow to change homebranch in batch add course reserves 2020-05-12 11:40:54 +01:00
debian Bug 25509: Remove useless libjs-jquery dependency 2020-06-24 14:31:37 +02:00
docs Update contributors 2020-05-31 21:37:51 +01:00
errors
etc Bug 23975: (RM follow-up) Comment example configuration 2020-05-22 12:09:29 +01:00
ill
installer Bug 25858: Use bitwise OR for setting a bit in borrowers.flag 2020-06-29 12:37:01 +02:00
Koha Bug 24156: Make sort order and number of items to display configurable (basket page) 2020-06-25 10:51:59 +02:00
koha-tmpl Bug 25322: fix for not selected "relationship" defaults to father 2020-06-29 12:37:02 +02:00
labels
members Bug 25322: fix for not selected "relationship" defaults to father 2020-06-29 12:37:02 +02:00
misc Bug 24159: (QA follow-up) Make terminology consistent 2020-06-25 10:51:59 +02:00
offline_circ
opac Bug 18911: Add the ability to set the preferred lang for notice at the OPAC 2020-06-24 15:15:41 +02:00
patron_lists
patroncards
plugins Bug 23975: (RM follow-up) Comment example configuration 2020-05-22 12:09:29 +01:00
pos Bug 25139: Corrections to date picker handling 2020-04-15 08:33:07 +01:00
reports
reserve Bug 25516: Fix for "Can't call method unblessed on unblessed reference" 2020-05-19 08:29:34 +01:00
reviews
rotating_collections Bug 21500: Remove warnings in rotating collections 2018-10-09 15:02:45 +00:00
serials
services
skel
suggestion Bug 24819: (follow-up) Rename suggestor to suggester 2020-04-20 13:36:42 +01:00
svc
t Bug 25875: Unit test 2020-06-29 12:37:02 +02:00
tags
tmp/modified_authorities
tools Bug 4985: Fix Plack scope errors 2020-06-24 15:27:27 +02:00
virtualshelves
xt Bug 24897: (RM follow-up) Drop tests for es-ES notices 2020-04-28 06:55:56 +01:00
.editorconfig Bug 24774: Set JSON indentation of 2 spaces in .editorconfig 2020-03-19 09:24:52 +00:00
.eslintrc.json
.gitignore
.htaccess
.mailmap
.scss-lint.yml
about.pl Bug 25807: Add Template 3.008 to the exclude list 2020-06-29 12:37:01 +02:00
changelanguage.pl
cpanfile Bug 25807: Add Template 3.008 to the exclude list 2020-06-29 12:37:01 +02:00
fix-perl-path.PL
gulpfile.js
help.pl Bug 19817: Use the language from the interface if valid 2018-09-06 17:32:28 +00:00
INSTALL
Koha.pm Bug 24156: DBRev 20.06.00.003 2020-06-25 10:55:41 +02:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL Bug 25149: Fix Zebra language code for Greek 2020-04-29 17:14:30 +01:00
MANIFEST.SKIP
package.json
README
README.md
README.robots
rewrite-config.PL
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo