Koha-clms/members
Emmi Takkinen a779b92a7a
Bug 40116: Do not display "Patron is already a guarantor..." popup when error occurs
If a yellow error message appears when saving the guaranteed patron,
also an extra popup message "Patron is already a guarantor for this
patron" will appear on the screen. It should only appear when you try
to add the same patron as a guarantor that already is a guarantor for
that patron. This happens because js function select_user is triggered
every time when guarantor data is send back to front-end with variable
new_guarantors if error occurs. Already existing guarantors shouldn't
be send back to front-end since their data is not lost. This patch
changes existing guarantors form elements to use classes "guarantor_id"
and "guarantor_relationship" to prevent this.

To test:
1. Find a patron with Patron guarantor or add first a Patron guarantor
   (not a Non-patron guarantor) to a juvenile patron and save.
2. Edit again the same patron with guarantor and modify their age
   to be greater than the upperage or under the required age of the
   patron category.
   => Notice that you will get a yellow message "The following fields
      are wrong. Please fix them..."
   => Notice that you will also get a pop up notice that says "Patron is
      already a guarantor for this patron".
3. Apply this patch.
4. Repeat step 2.
   => Confirm that yellow message box is displayed but "Patron is..."
      pop-up is not
   => Also confirm that guarantors data is not lost.
5. Try to add same patron guarantor as guarantor for guarantee patron
   again.
   => Confirm that pop-up is displayed right after attempting to add
      guarantor.
6. Try to add new guarantor for patron.
   => New guarantor should be added.
7. Attempt to save the patron.
   => Confirm that both guarantors data is still displayed in form.
8. Fix patrons age and attempt to save.
   => Patron is saved and both guarantors are displayed in their
      details.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f2fe453dd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 073fbd2696)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-08-01 11:41:27 +02:00
..
accountline-details.pl Bug 35044: Update: Manual invoices, manual credits and accountlines 2024-08-23 18:21:24 +02:00
alert-subscriptions.pl Bug 34478: Manual fix - add cud- op - alert-subscriptions.pl 2024-03-01 10:59:46 +01:00
apikeys.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
boraccount.pl Bug 36190: Fix problems found by test 2024-03-15 09:38:54 +01:00
cancel-charge.pl Bug 37786: members/cancel-charge.pl needs CSRF protection 2024-10-18 14:25:55 +02:00
default_messageprefs.pl
…
deletemem.pl Bug 34478: (follow-up) Remove check_csrf from pl files 2024-03-01 10:58:41 +01:00
discharge.pl Bug 34478: Manual fix - add op - members/discharge 2024-03-01 10:57:27 +01:00
discharges.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
files.pl Bug 37365: (QA follow-up) Add error checking around AddFile call 2024-11-07 17:32:44 +01:00
holdshistory.pl Bug 35560: Use the REST API for holds 2025-05-23 12:18:29 +02:00
housebound.pl Bug 34478: Fix various parameters on housebound details page 2024-03-01 10:59:37 +01:00
ill-requests.pl Bug 35581: Koha::Illrequest -> Koha::ILL::Request 2024-04-22 08:57:45 +02:00
mancredit.pl Bug 35044: (QA follow-up): DRY code before set_additional_fields 2024-08-23 18:21:26 +02:00
maninvoice.pl Bug 35044: (QA follow-up): DRY code before set_additional_fields 2024-08-23 18:21:26 +02:00
member-flags.pl Bug 34478: Changes for members/member-flags 2024-03-01 10:57:46 +01:00
member-password.pl Bug 33832: Allow updating username without changing password on member-password.pl 2024-04-18 16:51:11 +02:00
member.pl Bug 36302: members-home.pl defers loading, member.pl does not 2024-04-03 09:53:31 +02:00
memberentry.pl Bug 40116: Do not display "Patron is already a guarantor..." popup when error occurs 2025-08-01 11:41:27 +02:00
members-home.pl Bug 33484: Do not defer loading if state is loaded from localStorage 2024-10-28 17:10:19 +01:00
members-update-do.pl Bug 34478: Add missing op - members-update 2024-03-01 10:57:04 +01:00
members-update.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
merge-patrons.pl Bug 34478: Manual fix - Rename action with op change to post - merge-patrons 2024-03-01 10:56:40 +01:00
mod_debarment.pl Bug 34478: Rename action with op - mod_debarment 2024-03-01 10:57:03 +01:00
moremember.pl Bug 28924: (QA follow-up) Use $self instead of $patron 2024-07-18 18:25:55 +02:00
notices.pl Bug 35279: Add fallback to print for 'Send welcome email' 2024-03-22 15:47:36 +01:00
patronimage.pl Bug 29541: Prevent users from another group to access patron's images 2022-02-02 21:05:29 -10:00
pay.pl Bug 34478: Add notes to pay.pl 2024-03-01 10:59:31 +01:00
paycollect.pl Bug 35044: (QA follow-up): DRY code before set_additional_fields 2024-08-23 18:21:26 +02:00
print_overdues.pl Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02:00
printfeercpt.pl Bug 33478: Apply formatting to ACCOUNT_CREDIT 2024-04-26 20:15:43 +02:00
printinvoice.pl Bug 33478: Apply formatting to ACCOUNT_DEBIT 2024-04-26 20:15:43 +02:00
printnotice.pl Bug 33478: Apply formatting to ACCOUNTS_SUMMARY 2024-04-26 20:15:45 +02:00
printslip.pl Bug 38089: (QA follow-up) Ensure style works on members/printslip.pl 2024-10-11 11:13:47 +02:00
purchase-suggestions.pl Bug 33363: Add separate permissions for creating and deleting suggestions 2024-07-12 10:21:24 +02:00
readingrec.pl Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff 2023-09-22 12:35:49 -03:00
recallshistory.pl Bug 30291: Changes to staff client files 2022-05-05 11:17:36 -10:00
routing-lists.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
setstatus.pl Bug 38847: Fix error when renewing an expired child patron without a guarantor 2025-06-19 09:57:15 +02:00
statistics.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
summary-print.pl Bug 36476: Add holds priority column to members/summary-print.pl pending holds table 2024-06-21 15:02:57 +02:00
two_factor_auth.pl Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email 2024-03-01 10:57:14 +01:00
update-child.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00