[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-08-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Fridolin Somers  changed:

   What|Removed |Added

 Version(s)|25.11.00,25.05.02   |25.11.00,25.05.02,24.11.08
released in||
 Status|Pushed to stable|Pushed to oldstable

--- Comment #16 from Fridolin Somers  ---
Pushed to 24.11.x for 24.11.08

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-08-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Fridolin Somers  changed:

   What|Removed |Added

 CC||[email protected]
   ||m
   Keywords|release-notes-needed|

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-24 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

--- Comment #15 from Paul Derscheid  ---
Nice work everyone!

Pushed to 25.05.x

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-24 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Paul Derscheid  changed:

   What|Removed |Added

 Version(s)|25.11.00|25.11.00,25.05.02
released in||
 Status|Pushed to main  |Pushed to stable

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Aleisha Amohia  changed:

   What|Removed |Added

  Text to go in the||This patch changes existing
  release notes||guarantors elements in the
   ||patron add form to use
   ||classes "guarantor_id" and
   ||"guarantor_relationship" to
   ||prevent an unnecessary
   ||pop-up if the form throws
   ||an error.

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Lucas Gass (lukeg)  changed:

   What|Removed |Added

 CC||[email protected]
   Keywords||release-notes-needed

--- Comment #14 from Lucas Gass (lukeg)  ---
Please don't forget to add release notes

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

--- Comment #13 from Lucas Gass (lukeg)  ---
Nice work everyone!

Pushed to main for 25.11

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Lucas Gass (lukeg)  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to main
 Version(s)||25.11.00
released in||

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #184049|0   |1
is obsolete||

--- Comment #12 from Aleisha Amohia  ---
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 
Signed-off-by: Aleisha Amohia 

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-14 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Owen Leonard  changed:

   What|Removed |Added

 Attachment #183780|0   |1
is obsolete||

--- Comment #11 from Owen Leonard  ---
Created attachment 184049
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184049&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 

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-14 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Owen Leonard  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
 Status|Needs Signoff   |Signed Off

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #183718|0   |1
is obsolete||
 Attachment #183746|0   |1
is obsolete||

--- Comment #10 from Emmi Takkinen  ---
Created attachment 183780
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183780&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

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #9 from Emmi Takkinen  ---
Just realized that first patch is actually now obsolete. Getting rid of the
"new_guarantor_id" and "new_guarantor_relationship" classes is enough to fix
the original problem, there is no need to send variable "nok" to front-end.

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

--- Comment #8 from Emmi Takkinen  ---
Created attachment 183746
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183746&action=edit
Bug 40116: Change classes for existing guarantors in patron form

We are currently using classes "new_guarantor_id" and
"new_guarantor_relationship" with existing guarantors in patron
add/modify form. These classes should mainly be used when
new guarantor is added and to ensure their data is not lost when
error occurs. Now with previous patch applied using them leads to
situation where existing guarantors information is displayed twice
(or more times) if error occurs. This patch changes these classes
as "guarantor_id" and "guarantor_relationship".

To test:
1. Find patron who has a guarantor.
2. Modify their age to be greater than the upperage or under the
required age of the patron category.
3. Attempt to save patron.
=> Notice that guarantor is now displayed twice in "Patron guarantor"
section.
4. Apply this patch.
5. Attempt to save the patron again.
=> Notice that guarantor is no longer duplicated in
"Patron guarantor" section.
6. Try to readd same patron as guarantor.
=> Pop-up "Patron is already a guarantor for this patron" should be
displayed.
7. Try to add new guarantor for patron.
=> New guarantor should be added.
8. Attempt to save the patron.
=> Neither existing patron or new patron is duplicated.
9. Fix patrons age and attempt to save.
=> Patron is saved and both guarantors are displayed in their details.

Sponsored-by: Koha-Suomi Oy

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

--- Comment #7 from Emmi Takkinen  ---
There is an oddity in existing guarantors classes. They use classes
"new_guarantor_id" and "new_guarantor_relationship" which are readded to the
form if error occurs. Which should only be done to guarantors who are not yet
saved as guarantors. I changed those classes as "guarantor_id" and
"guarantor_relationship" and now they are no longer duplicated if error occurs.
But for some reason I'm now unable to save any of my guarantee patrons :D

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #6 from Emmi Takkinen  ---
There is now a new problem with this patch. If error occurs all guarantors are
displayed twice (or more) in form.

To reproduce:
1. Find patron who has guarantor.
2. Modify their age to be greater than the upperage or under the required age
of the patron category.
3. Attempt to save patron.
=> Notice that guarantor is now displayed twice in "Patron guarantor" section.

Guarantor isn't saved again, but this still needs some rethinking. Setting this
as Failed QA.

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Aleisha Amohia  changed:

   What|Removed |Added

 QA Contact|[email protected] |[email protected]
   |y.org   |
 CC||[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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #183249|0   |1
is obsolete||

--- Comment #5 from Aleisha Amohia  ---
Created attachment 183718
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183718&action=edit
Bug 40116: Do not display "Patron is already a guarantor..." pop-up 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. This patch
sends nok variable as parameter to this same function so that if error
occurs checkin patron guarantors is skipped.

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
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.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Flater 
Signed-off-by: Aleisha Amohia 

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-07-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #183240|0   |1
is obsolete||

--- Comment #4 from Emmi Takkinen  ---
Comment on attachment 183240
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183240
Bug 40116: Do not display "Patron is already a guarantor..."  pop-up when error
occurs

>From db6d7ef8c3fc95a837b29ae15dcfed7e302eba00 Mon Sep 17 00:00:00 2001
>From: Emmi Takkinen 
>Date: Fri, 13 Jun 2025 13:15:57 +0300
>Subject: [PATCH] Bug 40116: Do not display "Patron is already a guarantor..."
> pop-up 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. This patch
>sends nok variable as parameter to this same function so that if error
>occurs checkin patron guarantors is skipped.
>
>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
>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.
>
>Sponsored-by: Koha-Suomi Oy
>---
> .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt   | 2 +-
> koha-tmpl/intranet-tmpl/prog/js/members.js| 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt 
>b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
>index 361a178107..494bf3cc37 100644
>--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
>+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
>@@ -1779,7 +1779,7 @@
> 
> [% IF new_guarantors %]
> [% FOREACH g IN new_guarantors %]
>-select_user( '[% g.patron.borrowernumber | html %]', [% 
>To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' );
>+select_user( '[% g.patron.borrowernumber | html %]', [% 
>To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]', [% nok 
>| $raw %] );
> [% END %]
> [% END %]
> 
>diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js 
>b/koha-tmpl/intranet-tmpl/prog/js/members.js
>index a20561cfe0..7429e21859 100644
>--- a/koha-tmpl/intranet-tmpl/prog/js/members.js
>+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js
>@@ -90,12 +90,12 @@ function update_category_code(category_code) {
> hint.html(hint_string);
> }
> 
>-function select_user(borrowernumber, borrower, relationship) {
>+function select_user(borrowernumber, borrower, relationship, nok) {
> let is_guarantor = $(
> `.guarantor-details[data-borrowernumber=${borrowernumber}]`
> ).length;
> 
>-if (is_guarantor) {
>+if (is_guarantor && !nok) {
> alert("Patron is already a guarantor for this patron");
> } else {
> $("#guarantor_id").val(borrowernumber);
>-- 
>2.34.1
>

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-06-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

David Flater  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-06-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

David Flater  changed:

   What|Removed |Added

 CC||[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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-06-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

--- Comment #3 from David Flater  ---
Created attachment 183249
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183249&action=edit
Bug 40116: Do not display "Patron is already a guarantor..." pop-up 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. This patch
sends nok variable as parameter to this same function so that if error
occurs checkin patron guarantors is skipped.

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
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.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Flater 

-- 
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-06-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff
   Assignee|[email protected] |[email protected]
   |ity.org |

--- Comment #2 from Emmi Takkinen  ---
Created attachment 183240
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183240&action=edit
Bug 40116: Do not display "Patron is already a guarantor..."  pop-up 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. This patch
sends nok variable as parameter to this same function so that if error
occurs checkin patron guarantors is skipped.

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
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.

Sponsored-by: Koha-Suomi Oy

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/


[Koha-bugs] [Bug 40116] Extra popup notice when saving a patron with patron guarantor ends in error

2025-06-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40116

Emmi Takkinen  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #1 from Emmi Takkinen  ---
Bug 26558 made changes to restoring guarantor data when error occurs while
creating/modifying patron. Now every time error occurs param new_guarantors is
send to front-end side which triggers function select_user in member.js.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/