https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116
Aleisha Amohia <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184049|0 |1 is obsolete| | --- Comment #12 from Aleisha Amohia <[email protected]> --- Created attachment 184119 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184119&action=edit 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 <[email protected]> Signed-off-by: Aleisha Amohia <[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/
