Bug 32530

Summary: When duplicating child card, guarantor is not saved
Product: Koha Reporter: Benjamin Daeuber <bdaeuber>
Component: PatronsAssignee: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Status: RESOLVED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: baptiste.wojtkowski, caroline.cyr-la-rose, clackman, emmi.takkinen, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, lisette, lucas, mspagnuolo
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 37881    
Attachments: Bug 32530: When duplicating child card, guarantor is not saved
Bug 32530: When duplicating child card, guarantor is not saved
Bug 32530: When duplicating child card, guarantor is not saved
Bug 32530: When duplicating child card, guarantor is not saved

Description Benjamin Daeuber 2022-12-23 22:36:57 UTC
When duplicating a child card with a guarantor, the guarantor information appears during the card creation process, but disappears as soon as saving the card. To recreate:

1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.
Comment 1 Caroline Cyr La Rose 2023-05-23 15:00:16 UTC
Still valid in master (22.12.00.048)
Comment 2 Michael Spagnuolo 2023-07-10 16:36:44 UTC
Our library staff have noticed this bug, and it is causing extra steps during family card creation. We would like to see it fixed.
Comment 3 Emmi Takkinen 2023-09-14 07:54:02 UTC
*** Bug 34763 has been marked as a duplicate of this bug. ***
Comment 4 Baptiste Wojtkowski (bwoj) 2024-07-11 13:37:30 UTC
Hi,
I do not reproduce on main (v24.05.01), is it still valid ?
Comment 5 Baptiste Wojtkowski (bwoj) 2024-07-11 13:48:14 UTC
I finally reproduce on main, looking forward to fix it
Comment 6 Benjamin Daeuber 2024-07-11 14:01:44 UTC
It is still occurring on main (23.06). It does appear to work until you save the duplicated card, at which point the guarantor is not attached.
Comment 7 Baptiste Wojtkowski (bwoj) 2024-07-11 14:59:22 UTC
Created attachment 168833 [details] [review]
Bug 32530: When duplicating child card, guarantor is not saved

When duplicating a child card with a guarantor, the guarantor information appears during the card creation process, but disappears as soon as saving the card. To recreate:

1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.

New test plan:
1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.
Apply patch and repeat, the guarantor should stay after 3.

Note, I may not have understood the code but it looks like nothing is
searching for the content of the displayed information. Therefore I add
hidden fields that are copies of those provided in guarantor_template
class
Comment 8 Baptiste Wojtkowski (bwoj) 2024-07-11 15:04:38 UTC
Created attachment 168834 [details] [review]
Bug 32530: When duplicating child card, guarantor is not saved

When duplicating a child card with a guarantor, the guarantor information appears during the card creation process, but disappears as soon as saving the card. To recreate:

1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.

New test plan:
1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.
Apply patch and repeat, the guarantor should stay after 3.

Note, I may not have understood the code but it looks like nothing is
searching for the content of the displayed information. Therefore I add
hidden fields that are copies of those provided in guarantor_template
class
Comment 9 Emmi Takkinen 2024-07-12 10:21:29 UTC
Created attachment 168873 [details] [review]
Bug 32530: When duplicating child card, guarantor is not saved

When duplicating a child card with a guarantor, the guarantor information appears during the card creation process, but disappears as soon as saving the card. To recreate:

1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.

New test plan:
1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card creation screen.
3. Save the patron after completing the form. The guarantor is now gone.
Apply patch and repeat, the guarantor should stay after 3.

Note, I may not have understood the code but it looks like nothing is
searching for the content of the displayed information. Therefore I add
hidden fields that are copies of those provided in guarantor_template
class

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Comment 10 Martin Renvoize (ashimema) 2024-07-17 16:18:16 UTC
Created attachment 169101 [details] [review]
Bug 32530: When duplicating child card, guarantor is not saved

When duplicating a child card with a guarantor, the guarantor information
appears during the card creation process, but disappears as soon as saving
the card. To recreate:

1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card
   creation screen.
3. Save the patron after completing the form. The guarantor is now gone.

New test plan:
1. Find a card with a guarantor, either patron or non-patron guarantor.
2. Duplicate the card. Note that it appears to be working on the card
   creation screen.
3. Save the patron after completing the form. The guarantor is now gone.
Apply patch and repeat, the guarantor should stay after 3.

Note, I may not have understood the code but it looks like nothing is
searching for the content of the displayed information. Therefore I add
hidden fields that are copies of those provided in guarantor_template
class

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize (ashimema) 2024-07-17 16:18:42 UTC
Thanks for the fix guys, Passing QA
Comment 12 Katrin Fischer 2024-07-18 15:57:07 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 13 Jonathan Druart 2024-09-10 12:59:06 UTC
This introduced a critical issue when editing patron, see bug 37881. Please fix ASAP.
Comment 14 Lucas Gass (lukeg) 2024-10-09 22:03:37 UTC
BAckported to 24.05.x for upcoming 24.05.05
Comment 15 Fridolin Somers 2024-10-21 13:38:52 UTC
(In reply to Jonathan Druart from comment #13)
> This introduced a critical issue when editing patron, see bug 37881. Please
> fix ASAP.

Bug 37881 currently only in main so I do not backport this one.

@Lucas revert this one or backport also Bug 37881
Comment 16 Lucas Gass (lukeg) 2024-11-07 17:57:33 UTC
(In reply to Fridolin Somers from comment #15)
> (In reply to Jonathan Druart from comment #13)
> > This introduced a critical issue when editing patron, see bug 37881. Please
> > fix ASAP.
> 
> Bug 37881 currently only in main so I do not backport this one.
> 
> @Lucas revert this one or backport also Bug 37881

I am reverting this one prior to the release of 24.05.05. I will happily reconsider for 24.05.06