[Koha-bugs] [Bug 26558] Guarantor information is lost when an error occurs during new account creation

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 12 04:27:45 CEST 2023


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

Aleisha Amohia <aleisha at catalyst.net.nz> changed:

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

--- Comment #11 from Aleisha Amohia <aleisha at catalyst.net.nz> ---
Created attachment 155522
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155522&action=edit
Bug 26558: Make guarantor information persist despite an error

When one tries to create an account with patron guarantor and
error occurs (already used username, wrong age etc.), guarantor
information is lost. This patch always saves added patron
guarantor information to the template param new_guarantors.

To test:
1. Create a new account but cause an error that will keep the
account from saving (enter the wrong age for a category or
give the patron a username that's already being used).
2. Search for and select a guarantor.
3. Try to save the account and wait for the "The following
fields are wrong. Please fix them." message.
=> Note that the guarantor information is gone and you need
to search for and select the guarantor again.
4. Apply this patch.
5. Repeat steps 1.-3.
=> Note that guarantor information hasn't been lost.

This patch also removes code block from duplicate patron
check because we now save param new_guarantors even if
error doesn't occur.

To test:
1. Create a new account but cause a duplicate patron error.
2. Search for and select a guarantor.
3. Try to save the account.
=> Guarantor information should persist.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sam Lau <samalau at gmail.com>
Signed-off-by: Aleisha Amohia <aleishaamohia at hotmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list