https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37528

Martin Renvoize (ashimema) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #171541|0                           |1
        is obsolete|                            |

--- Comment #13 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 172893
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172893&action=edit
Bug 37528: check if selected relationship is valid

This patch checks if the selected relationship is valid before trying to save
the patron record.
It takes the list of valid relationships from borrowerRelationships syspref and
checks if the selected relationship is in the list.

Also this patch fixes relationship field required message when
BorrowerMandatoryField is not set.
The required message is shown when adding the guarantee from guarantor's detail
page.

Test plan:
1) Add at least one option to borrowerRelationships syspref.
2) Leave the relationship unchecked from BorrowerMandatoryField syspref.
3) Create a new guarantee patron.
4) Add a guarantor to the guarantee patron.
5) Leave the relationship field empty and try to save the patron record.
6) Notice the 500 error page.
7) Apply the patch.
8) Repeat steps 3-5.
9) Notice the error message "Guarantor relationship is invalid".

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Olivier V <[email protected]>
Signed-off-by: Baptiste Wojtkowski <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to