Koha-clms/members
Emmi Takkinen 073fbd2696
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>
2025-07-24 10:23:27 +02:00
..
accountline-details.pl Bug 37222: Standardize markup for sidebar menus 2025-02-21 16:41:24 +01:00
alert-subscriptions.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
apikeys.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
boraccount.pl Bug 37211: Make notes in patron transactions table editable 2025-04-14 08:51:12 +02:00
cancel-charge.pl Bug 23674: Add ability to add note to canceled charge 2025-03-10 11:42:36 +01:00
default_messageprefs.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
deletemem.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
discharge.pl Bug 14250: Patron with fines cannot be discharged anymore 2025-04-22 08:46:26 +02:00
discharges.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
files.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
holdshistory.pl Bug 35560: Use the REST API for holds 2025-04-14 08:51:17 +02:00
housebound.pl Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
ill-requests.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mancredit.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
maninvoice.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
member-flags.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
member-password.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
member.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
memberentry.pl Bug 40116: Do not display "Patron is already a guarantor..." popup when error occurs 2025-07-24 10:23:27 +02:00
members-home.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members-update-do.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members-update.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
merge-patrons.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mod_debarment.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
moremember.pl Bug 38532: (follow-up) Use Koha::Patron->account methods 2025-05-08 07:59:08 +02:00
notices.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
patronimage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
pay.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
paycollect.pl Bug 37222: Standardize markup for sidebar menus 2025-02-21 16:41:24 +01:00
print_overdues.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printfeercpt.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printinvoice.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printnotice.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printslip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
purchase-suggestions.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
readingrec.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
recallshistory.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
routing-lists.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
setstatus.pl Bug 38847: Fix error when renewing an expired child patron without a guarantor 2025-02-12 15:28:17 +01:00
statistics.pl Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
summary-print.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
two_factor_auth.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
update-child.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00