Summary: | Using borrowerRelationship while guarantor relationship is unchecked from BorrowerMandatoryField results in error | ||
---|---|---|---|
Product: | Koha | Reporter: | Katariina Pohto <katariina.pohto> |
Component: | Patrons | Assignee: | Johanna Räisä <johanna.raisa> |
Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, johanna.raisa, kyle.m.hall, ovezina |
Version: | 24.05 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 37528: check if selected relationship is valid
Bug 37528: check if selected relationship is valid |
Description
Katariina Pohto
2024-07-30 13:57:03 UTC
Created attachment 169925 [details] [review] 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 Created attachment 171277 [details] [review] 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 <olivier.vezina@inLibro.com> |